This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Legal c++ one-liner doesn't compile with gcc 2.95.2
- To: gcc-bugs at gcc dot gnu dot org, hymie at prolifics dot com
- Subject: Re: Legal c++ one-liner doesn't compile with gcc 2.95.2
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Mon, 10 Jul 2000 16:50:53 -0400
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?)