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?