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]

Re: Legal c++ one-liner doesn't compile with gcc 2.95.2



Is this to do with his "magical NULL" post to comp.std.c++, by any chance?


> ------------------
> const class { } a;
> ------------------

I don't know that this is legal.  [8.5]/9 says

#   ...if the object is of const-qualified type, the underlying class
#   type shall have a user-declared default constructor.
                      ^^^^^^^^^^^^^


Phil
(who approved the posting to c.s.c++, which was probably generated by an
email from me to Scott asking an unrelated question about his "magical
NULL" example... have I spawned a monster here?)


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