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

java - Cannot send AES encrypted messages of over 47 characters -

php - How to set default value of a select dynamically from database using smarty? -

telerik - Reformat image format in PDF -