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"


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


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