c++/10749: [3.3/3.4 regression] triple nested template classes in namespace need to qualify ns
bangerth@dealii.org
bangerth@dealii.org
Mon May 12 15:37:00 GMT 2003
Old Synopsis: regression from 2.95.3: triple nested template classes in namespace need to qualify ns
New Synopsis: [3.3/3.4 regression] triple nested template classes in namespace need to qualify ns
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon May 12 15:31:43 2003
State-Changed-Why:
Confirmed. This is a regression in 3.3 and 3.4, though
with different failure modes:
------------------------------------
namespace ns {
template<typename T>
struct Foo {
template<typename U> struct Bar;
};
template<typename T>
template<typename U>
struct Foo<T>::Bar {
template<typename V> struct Baz;
};
template<typename T>
template<typename U>
template<typename V>
struct Foo<T>::Bar<U>::Baz {
Foo<T> chokes;
ns::Foo<T> works;
};
}
---------------------------
The code is legal, and 2.95 compiles it, but 3.3 and
3.4 reject it for different reasons:
g/x> c++ -c x.cc
g/x>
g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
x.cc:18: error: non-template type `Foo' used as a template
x.cc:18: error: ISO C++ forbids declaration of `chokes' with no type
g/x>
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:17: error: too many template-parameter-lists
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10749
More information about the Gcc-bugs
mailing list