Say, if I have a generic Swift class Foo, is there a way to have it generate different code depending on whether T is a struct or a class? I.e. add an & for a mutator call or an inout to a parameter?

@uliwitness you can constrain a generic by using ‘where T: AnyObject’ but there is no negations to constrain where not something

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!