aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/lambda-targ2.C
blob: 41b8d8749f2bc982d69043764c8ae9c99ac5414f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/114393
// { dg-do compile { target c++20 } }

template <auto _DescriptorFn> struct c1 {};

template <class _Descriptor, auto t = [] { return _Descriptor(); }>
inline constexpr auto b_v = t;

template <class _Tag>
using c1_t = c1<b_v<int>>;

template <class _Data>
constexpr auto g(_Data __data) {
  return c1_t<_Data>{};
}

void f() {
  auto &&b = g(0);
}