Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-requires39.C

raw
1 // PR c++/117887
2 // { dg-do compile { target c++20 } }
3
4 template<bool V> struct A { static constexpr bool value = V; };
5
6 template<class T>
7 using AT = A<requires { requires sizeof(T) != sizeof(T*); }>;
8
9 template<class T> struct B { using type = T; };
10
11 template<class T>
12 void f() {
13 static_assert( B<AT<T>>::type::value);
14 static_assert(!B<AT<T*>>::type::value);
15 }
16
17 template void f<char>();