diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp2a/concepts-requires29.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp2a/concepts-requires29.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires29.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires29.C new file mode 100644 index 00000000000..2cf69433d99 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires29.C @@ -0,0 +1,18 @@ +// PR c++/103105 +// { dg-do compile { target c++20 } } + +template<bool> struct A; + +template<class... Ts> +using wrap = A<1 != (0 + ... + requires { Ts(); })>; + +template<class... Ts> using type = wrap<Ts...>; + +using ty0 = type<>; +using ty0 = A<true>; + +using ty1 = type<int>; +using ty1 = A<false>; + +using ty2 = type<int, int>; +using ty2 = A<true>; |