[Bug c++/54922] [C++11][DR 1359] constexpr constructors require initialization of all union members
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 13 20:54:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54922
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-10-13 20:54:14 UTC ---
(In reply to comment #0)
Some copy'n-paste error occurred while attempting to format the code example.
The correct code under investigation was:
//----------------
class nullable_int
{
bool init_;
union {
unsigned char for_value_init;
int value_;
};
public:
constexpr nullable_int() : init_(false), for_value_init() {}
};
//----------------
More information about the Gcc-bugs
mailing list