repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/54922
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-union4.C
blob
a8d6b8d3ea69382cafca807f1678eecad3ed885a
1
// PR c++/54922
2
// { dg-do compile { target c++11 } }
3
4
struct nullable_int
5
{
6
bool init_;
7
union {
8
unsigned char for_value_init;
9
int value_;
10
};
11
12
constexpr nullable_int() : init_(false), for_value_init() {}
13
};
14
15
#define SA(X) static_assert(X,#X)
16
17
constexpr nullable_int n;
18
SA((n.for_value_init == 0));