summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-51707.C
blob: ae02a31c540b1a5ca42faae93ea581c38c956a7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/51707
// { dg-do compile { target c++11 } }

struct S {
	constexpr S() {}
};

struct T {
	constexpr T(S const& s) : s{s} {}
	S const& s;
};

constexpr S s {};
constexpr T t { s };