gcc/testsuite/g++.dg/cpp2a/concepts-lambda20.C
raw| 1 | // PR c++/105652 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | // { dg-additional-options -g } |
| 4 | |
| 5 | template<int> |
| 6 | struct I {}; |
| 7 | |
| 8 | template<class T> |
| 9 | concept C = []<int N>(I<N>) { return true; } (I<0>{}); |
| 10 | |
| 11 | template<class T> |
| 12 | struct S { }; |
| 13 | |
| 14 | template<C T> |
| 15 | struct S<T> { constexpr static bool value = true; }; |
| 16 | |
| 17 | static_assert(S<int>::value); |