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