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: bangerth at dealii dot org
- To: dave at boost-consulting dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 13 Jan 2003 21:59:59 -0000
- Subject: Re: c++/9278: Illegal use of typedef to "void"
- Reply-to: bangerth at dealii dot org, dave at boost-consulting dot com, 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
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...
----------------------------
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