aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C
blob: 56b09bda0172d0b594764761189228a7ce3c8dbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/55432
// { dg-do compile { target c++11 } }

struct tag_t{} tag{};

constexpr tag_t const& pass(tag_t & t)
{
  return t;
}

struct S
{
  constexpr S(tag_t)  {};
};

struct T
{
  S mem;
  T( tag_t & args ) : mem(pass(args)) {}
};

T t(tag);