|
|
|
|
|
by nly
700 days ago
|
|
C++ concepts have the same problem. In practice is a non-issue for the language because templates already had this issue. In old-school C++ you would probably handle this with traits. I.e. a specialization of a tag type that can be written by either the class author or a third party that indicates a types semantic compatibility with a concept. Example: specialising std::hash instead of forcing everyone to add hashCode() members |
|