This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7605: ICE on template instatiation
- From: Detlef Vollmann <dv at vollmann dot ch>
- To: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, dv at vollmann dot ch, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gdr at gcc dot gnu dot org
- Date: Thu, 24 Oct 2002 03:57:22 +0200
- Subject: Re: c++/7605: ICE on template instatiation
- Organization: vollmann engineering gmbh
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
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;
}