gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | // { dg-additional-options "-fconcepts" } |
| 3 | |
| 4 | template<class I> |
| 5 | concept True = true; |
| 6 | |
| 7 | template<class T> |
| 8 | concept HasType = requires { typename T::type; }; |
| 9 | |
| 10 | template<class T> |
| 11 | struct S |
| 12 | { |
| 13 | void foo() requires HasType<T> && True<typename T::type>; |
| 14 | }; |
| 15 | |
| 16 | S<int> s; |
| 17 |