aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/lambda-targ10.C
blob: 7f175c93062fdbd96a3695278fe3c8aa658c014e (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, class T> struct A { static constexpr bool value = V; };

template<class T>
using AT = A<[]{return sizeof(T) != sizeof(T*); }(), 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>();