This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51675] [C++11][New in 4.7] Cannot create constexpr unions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51675

--- Comment #1 from RÃtroX <classixretrox at gmail dot com> 2011-12-24 18:24:45 UTC ---
More information: initializing in the constructor doesn't work, either.

union foo
{
    int x;
    short y;

    constexpr foo() : x(0) { }
};

Also does not compile.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]