struct struct_a { template<typename T> void foobar(T&) {} } template<typename T> requires templated_foobar<T> // how to write this concept? struct struct_b { } int main() { struct_b<struct_a> b; }
template<typename T> concept templated_foobar = requires (T t) { t.foobar(); }; // requirement not met template<typename T> concept templated_foobar = requires (T t) { template<typename U> t.foobar(U); }; // syntax error
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)