aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-requires39.C
blob: b13682033dac14150db7522c388507d785e3a1fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/117887
// { dg-do compile { target c++20 } }

template<bool V> struct A { static constexpr bool value = V; };

template<class T>
using AT = A<requires { requires sizeof(T) != sizeof(T*); }>;

template<class T> struct B { using type = T; };

template<class T>
void f() {
  static_assert( B<AT<T>>::type::value);
  static_assert(!B<AT<T*>>::type::value);
}

template void f<char>();