c++/7605: ICE on template instatiation
Detlef Vollmann
dv@vollmann.ch
Wed Oct 23 19:06:00 GMT 2002
The State of c++/7605 is still at "feedback", though
I don't know why. And the class is "ice-on-illegal-code",
though it should be "ice-on-legal-code".
I have attached a short program that is clearly legal
and that produces the same problem.
Detlef
--
Detlef Vollmann
vollmann engineering gmbh Tel: +41-41-4120911
P.O. Box 5106 Fax: +41-41-4120912
CH-6000 Luzern 5 / Switzerland eMail: dv@vollmann.ch
-------------- next part --------------
template <class T> class Base1 { public: T t; };
template <class U> class Base2 { public: U u; };
template <class T, class A>
class Map
{
public:
T t;
A a;
};
template <int id>
struct Types
{
template <typename T>
struct Templated
{
typedef Base1<T> Allocator;
};
typedef Base2<char> ClassifiedString;
};
template <int id>
struct Impl
{
typedef typename Types<id>::ClassifiedString String;
typedef Base2<String> Wrapped;
typedef typename Types<id>::Templated<Wrapped>::Allocator Allocator;
Map<String, Allocator> pMap;
};
int main()
{
Impl<0> impl;
return 0;
}
More information about the Gcc-bugs
mailing list