[Bug c++/42277] New: decltype error in template
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 4 17:21:00 GMT 2009
// { dg-options "-std=c++0x" }
struct S { int s; };
template <int N>
void foo ()
{
S s;
decltype (s.s) i;
}
diagnoses:
t.C: In function âÂÂvoid foo()âÂÂ:
t.C:6: error: type of âÂÂs.sâ is unknown
t.C:6: error: invalid type in declaration before âÂÂ;â token
(but compiles just fine when template <int N> line is commented out).
Both 4.4 and trunk diagnose this.
--
Summary: decltype error in template
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42277
More information about the Gcc-bugs
mailing list