1 2 3 4 5 6 7 8 9 10 11 12 13
// { dg-do compile { target c++20 } } template<class> constexpr bool is_int = false; template<> constexpr bool is_int<int> = true; template <class T> concept Int = is_int<T>; int main() { auto x = []<Int T>(T t) { return 42; }; auto y = x(42); auto z = x(""); // { dg-error "no match" } return z; }