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]

Re: c++/9278: Illegal use of typedef to "void"


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


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