1 // { dg-do compile { target c++17_only } } 2 // { dg-options "-fconcepts" } 3 4 template<typename T> 5 concept bool C1 = sizeof(T) == 0; 6 7 template<typename T, typename U> 8 concept bool C2 = __is_same_as(T, U); 9 10 11 template<typename T> requires(T t)12concept bool D1 = requires (T t) { { t } -> C1; }; 13 14 template<typename T> requires(T t)15concept bool D2 = requires (T t) { { t } -> C2<void>; }; 16 f1(auto D1)17void f1(auto D1) { } // OK: D1 is declared as a parameter f2(auto D2)18void f2(auto D2) { } // OK: D2 is declared as a parameter 19 main()20int main() 21 { 22 f1(0); 23 f2(0); 24 } 25