title: Type 'Any' does not conform to protocol 'Equatable' when trying to conform to an equatable generic Set
body: <p>I'm trying to create a base struct that supports a set of types (Int, Float, maybe string, possibly sometimes Vec4 matrix). I've built a base struct and conformed it to Hashable, made the type Equatable, but now I need to use this new struct in a Set.</p>
  
  <p>This line:</p>
  
  <pre><code>struct AdjustmentSet: Set&lt;BaseAdjustment&lt;Any&gt;&gt;
  </code></pre>
  
  <p>where I declare the struct for the Set, is throwing</p>
  
  <blockquote>
    <p>Type 'Any' does not conform to protocol 'Equatable'</p>
  </blockquote>
  
  <p>Which of course is obvious in and of itself, but I don't know how to actually define a type here that works (I tried <code>T: Equatable</code>, <code>Equatable</code>, and nothing works).</p>
  
  <pre><code>struct BaseAdjustment&lt;T: Equatable&gt;: Hashable {
  
      var hashValue: Int {
          return displayName.hashValue
      }
  
      static func == (lhs: BaseAdjustment&lt;T&gt;, rhs: BaseAdjustment&lt;T&gt;) -&gt; Bool {
          return lhs.displayName == rhs.displayName &amp;&amp;
              lhs.value == rhs.value &amp;&amp;
              lhs.isApplied == rhs.isApplied
      }
  
      var min: T?
      var max: T?
      var displayName: String = ""
      var value: T?
      var defaultValue: T?
      var isApplied: Bool = true
  
      init(min: T, max: T, displayName: String, defaultValue: T?) {
          self.min = min
          self.max = max
          self.displayName = displayName
          self.defaultValue = defaultValue
          self.value = defaultValue
          self.isApplied = true
      }
  }
  
  struct AdjustmentSet: Set&lt;BaseAdjustment&lt;Any&gt;&gt; {
      static var brightness   = BaseAdjustment&lt;CGFloat&gt;(min: 0, max: 1, displayName: "Brightness", defaultValue: 0)
      static var exposure     = BaseAdjustment&lt;CGFloat&gt;(min: 0, max: 1, displayName: "Exposure", defaultValue: 0)
      static var contrast     = BaseAdjustment&lt;CGFloat&gt;(min: 0, max: 1, displayName: "Contrast", defaultValue: 0)
  }
  </code></pre>
  
  <hr>
  
  <p>Addendum:</p>
  
  <p>I'm hopeful that with the introduction of <code>Opaque Types</code> in Swift 5, we can do away with this complexity by defining the set of type <code>some BaseAdjustment</code>.</p>