This is the mail archive of the gcc-prs@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++/10646: [3.3/3.4 regression] non-const reference is incorrectly matched in a "const T" partial specialization


Old Synopsis: is_const<T> treats references and functions as const
New Synopsis: [3.3/3.4 regression] non-const reference is incorrectly matched in a "const T" partial specialization

State-Changed-From-To: open->analyzed
State-Changed-By: bajo
State-Changed-When: Wed May  7 00:17:50 2003
State-Changed-Why:
    The bug for function types is confirmed in 3.2 but it's
    fixed in 3.3 (20030503) and 3.4 (20030503). It might be
    fixed in 3.2.3 as well, I don't have that version.
    
    There still is a bug with references, though:
    
    ---------------------------------
    template <typename T>
    struct is_const
    {
        typedef int type;
    };
    
    template <typename T>
    struct is_const<const T>
    {};
    
    is_const<bool&>::type a;
    ---------------------------------
    
    This should compile (but I'm not 100% sure because this
    very part of the standard is still a bit misterious for me),
    and it does on MSVC71 and Comeau/EDG, but fails with GCC
    3.3 and 3.4. Since it worked in 2.95, I rate this as a
    regression.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10646


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