This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9865: [3.2/3.3/3.4 regression] Template matching for reference types
- From: bangerth at dealii dot org
- To: dbeck at beckground dot hu, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 26 Feb 2003 17:52:32 -0000
- Subject: Re: c++/9865: [3.2/3.3/3.4 regression] Template matching for reference types
- Reply-to: bangerth at dealii dot org, dbeck at beckground dot hu, 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: 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