This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54922] [C++11][DR 1359] constexpr constructors require initialization of all union members
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 13 Oct 2012 20:54:14 +0000
- Subject: [Bug c++/54922] [C++11][DR 1359] constexpr constructors require initialization of all union members
- Auto-submitted: auto-generated
- References: <bug-54922-4@http.gcc.gnu.org/bugzilla/>
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() {}
};
//----------------