URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [nsdmi2.C] - Rev 693
Compare with Previous | Blame | View Log
// { dg-options -std=c++0x }
struct A
{
int i;
constexpr A(int i): i(i) {}
};
struct B
{
A a1 = 1;
A a2 { 2 };
A a3 = { 3 };
};
#define SA(X) static_assert(X,#X)
constexpr B b;
SA(b.a1.i == 1);
SA(b.a2.i == 2);
SA(b.a3.i == 3);