aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/decomp31.C
blob: 04b2516dadafde8f7a2c27a0baabb2ac64912069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/81888
// { dg-do compile { target c++1z } }

struct S {
  bool s = true;
};

auto [a] = S{};

template <class T>
bool
foo () noexcept
{
  auto [c] = T{};
  return c;
}

const bool b = foo<S> ();