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++/51633] [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr constructor


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

--- Comment #4 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-01-11 13:22:55 UTC ---
It seems to me that the first example might actually be considered as
valid.

One non-fully clear reason why it could have been considered invalid
in the first place is tat the constructor of B does not explicitly
initialize a.

But then A doesn't have any member.  So we can say in the end that "B
doesn't have any non-initialized member".  And that can be argued to
comply with this relevant pre-requisite for constexpr constructors in
[dcl.constexpr]/8:

    every non-static data member and base class sub-object shall be
    initialized

I have discussed this with Jason off-line and he seems to agree.

Thought anyone?


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