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++/9865: [3.2/3.3/3.4 regression] Template matching for reference types


Old Synopsis: traits for const types have bad results
New Synopsis: [3.2/3.3/3.4 regression] Template matching for reference types

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Feb 26 17:52:32 2003
State-Changed-Why:
    Confirmed. A shorter testcase is this:
    ----------------------------
    template <typename T> struct is_const {
        static const bool value = false;
    };
    
    template <typename T> struct is_const<const T> {
    };
    
    
    int main() {
      is_const<short &>::value;
    }
    -------------------------
    I don't think it should fail to compile, but it does since 
    3.2, the reason being that gcc decides to look into the
    const specialization of the template.
    
    W.

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


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