This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9278: Illegal use of typedef to "void"
- From: David Abrahams <dave at boost-consulting dot com>
- To: bangerth at dealii dot org
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Mon, 13 Jan 2003 19:11:46 -0500
- Subject: Re: c++/9278: Illegal use of typedef to "void"
- References: <20030113215959.19939.qmail@sources.redhat.com>
bangerth@dealii.org writes:
> Old Synopsis: dependent type in conversion operator bug
> New Synopsis: Illegal use of typedef to "void"
>
> State-Changed-From-To: analyzed->open
> State-Changed-By: bangerth
> State-Changed-When: Mon Jan 13 13:59:57 2003
> State-Changed-Why:
> Given the mail by Dave, the original code was in error, and
> the converse held. So this is what should _not_ compile, but
> does, according to him. (It does so since at least 2.95.)
> I think I have no idea myself whether this is legal or
> not, I did not even know whether one can typedef void...
Please insert a reference to
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#18
in the GNATs issue record. It explains what I'm saying.
> ----------------------------
> struct voidify { typedef void type; };
>
> struct X {
> operator int (voidify::type) const { return 1; }
> };
>
> X x;
> ---------------------
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9278
>
--
David Abrahams
dave@boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution