gcc/testsuite/g++.dg/cpp2a/concepts-return-req2.C
raw| 1 | // Verify we check return-type-requirements by passing the entire set of |
| 2 | // template arguments to normalization rather than first substituting into |
| 3 | // the constraint. The latter approach would induce a substitution failure and |
| 4 | // cause the requires-expression to evaluate to false here. |
| 5 | // { dg-do compile { target c++20 } } |
| 6 | |
| 7 | template <class, class> |
| 8 | concept C1 = true; |
| 9 | |
| 10 | template <class T> |
| 11 | concept C2 = requires { { 0 } -> C1<typename T::type>; }; |
| 12 | |
| 13 | static_assert(C2<int>); |