c++/9865: [3.2/3.3/3.4 regression] Template matching for reference types
bangerth@dealii.org
bangerth@dealii.org
Wed Feb 26 17:52:00 GMT 2003
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
More information about the Gcc-bugs
mailing list