gcc/testsuite/g++.dg/cpp2a/concepts-decltype6.C
raw| 1 | // PR c++/121822 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template<class...> |
| 5 | using void_t = void; |
| 6 | |
| 7 | template<class T> |
| 8 | concept Derived = requires { typename T::derived_type; }; |
| 9 | |
| 10 | template<class T, class = void> |
| 11 | struct Wrapper; |
| 12 | |
| 13 | template<class T> |
| 14 | struct Wrapper<T, void_t<decltype(void(Derived<T>))>> { }; |
| 15 | |
| 16 | Wrapper<int> x; |