Wildcard for C++ concepts saying “accepting anything for this template argument”
问题 Is there a way to allow a concept with template arguments , to be ok with any template parameter provided? I.e. some kind of wildcard magic for template argument placeholder? A usage example: template<class Me, TestAgainst> concept derived_from_or_same_as = std::same_as<Me, TestAgainst> || std::derived_from<decltype(p.first), First>; Above is needed because unfortunately primitive types behave differently than class types for is_base_of and derived_from . Now we can define a Pair concept that