1 // { dg-options "-std=c++1z -fconcepts" } 2 3 template<typename T> 4 struct S1 {}; 5 6 template<typename T> C()7concept bool C() { return requires(T x) { { x.fn() } -> S1<T>; }; } 8 9 template<C U> fn(U x)10void fn(U x) 11 { 12 x.fn(); 13 } 14 15 struct S2 16 { fnS217 auto fn() const { return S1<S2>(); } 18 }; 19 main()20int main() 21 { 22 fn(S2{}); 23 return 0; 24 } 25