4 ms·
So, if I'm reading the Wiki article right, this is C++'s version of Java's <T extends SomeInterface>?
by amyjess 11y ago
So, if I'm reading the Wiki article right, this is C++'s version of Java's <T extends SomeInterface>?
- steveklabnik 11y agoIn a way, yes. Other similar language features include traits in Rust and typeclasses in Haskell, in my understanding.
- Sharlin 11y agoAlso Scala's view bounds where a type is accepted if it's implicitly convertible to the required interface.