В следующем коде строка (123) не снимается.struct A {};
template
concept CanInvokeFoo = requires (T t) {
{ foo(t) };
};
template
void bar(T t) { foo(t); }
template
void foo(T t) {}
int main() {
bar(A{});
bar(123); // fails to compile
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... es-vs-user
Мобильная версия