swift - Can an Associated Type be restricted by protocol conformance and a where-clause? -


i'm trying:

public protocol myprotocol {     associatedtype myarray: rangereplaceablecollectiontype myarray.generator.element == mytype     //... } 

the protocol has property prototype of type [mytype]. decided generalize it. made associated type. can have conform best container type (rangereplaceablecollectiontype) syntax errors when added where clause. there (other) way specify not want generic container, restrict element type?


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo