1 // { dg-do compile { target c++17 } } 2 // { dg-options "-fconcepts" } 3 4 template<typename T> C1()5concept bool C1() 6 { 7 return requires() { typename T::type1; }; 8 } 9 10 template<typename T> C2()11concept bool C2() 12 { 13 return C1<T>() && requires() { typename T::type2; }; 14 } 15 16 template<C1 T> 17 struct S { 18 S& operator++() { return *this; } 19 S& operator++() requires C2<T>() { return *this; } 20 }; 21