OSDN Git Service

2012-12-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-value.C
1 // { dg-options -std=c++0x }
2
3 struct HopefullyLiteral {
4   HopefullyLiteral() = default; // Should be a constexpr c'tor as of 12.1/6 and 8.4.2/4
5 };
6
7 constexpr HopefullyLiteral var1{}; // OK
8 constexpr HopefullyLiteral var2 = HopefullyLiteral{}; // #1
9 constexpr HopefullyLiteral var3 = HopefullyLiteral(); // #2
10 constexpr HopefullyLiteral var4 = HopefullyLiteral(var3); // #3