title: Using as a concrete type conforming to protocol AnyObject is not supported
body: <p>I'm using Swift 2 and using WeakContainer as a way to store a set of weak objects, much like <code>NSHashTable.weakObjectsHashTable()</code></p>
  
  <pre><code>struct WeakContainer&lt;T: AnyObject&gt; {
      weak var value: T?
  }
  
  public protocol MyDelegate : AnyObject {
  
  }
  </code></pre>
  
  <p>Then in my ViewController, I declare</p>
  
  <pre><code>public var delegates = [WeakContainer&lt;MyDelegate&gt;]
  </code></pre>
  
  <p>But it is error</p>
  
  <blockquote>
    <p>Using MyDelegate as a concrete type conforming to protocol AnyObject is not supported</p>
  </blockquote>
  
  <p>I see that the error is that <code>WeakContainer</code> has <code>value</code> member declared as <code>weak</code>, so <code>T</code> is expected to be object. But I also declare <code>MyDelegate</code> as <code>AnyObject</code>, too. How to get around this?</p>