From 6912027863938818884
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ddd4cabacc4e505c,start
X-Google-Attributes: gidf78e5,public
From: "Gabor Greif" <gabor@no.netopia.com>
Subject: [Q] Class template specializable on a  template-template-parameter?
Date: 1999/09/30
Message-ID: <B3CF8C20-1E4EEA@192.168.1.8>#1/1
X-Deja-AN: 531070272
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
X-Original-Date: 5 Aug 99 18:44:43 +0200
Content-Type: text/plain; charset=US-ASCII
X-Complaints-To: news@news.unimelb.edu.au
X-Newsgroups-TO: nntp://news.noris.de/comp.std.c++
X-Trace: ariel.ucs.unimelb.edu.au 938686390 19223 128.250.37.153 (30 Sep 1999 10:13:10 GMT)
Organization: noris network GmbH, Nuernberg, Germany
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN/M3quEDnX0m9pzZAQEGtgF8CsTMI58w93sFjt2yP6wlJz61hBeICW17 1go9RoQ7/xdshI4yRzi+oaGc8Bwf+Szw =qlMW
X-News-Servers: news.noris.de
Mime-Version: 1.0
NNTP-Posting-Date: 30 Sep 1999 10:13:10 GMT
Newsgroups: comp.std.c++

Hello,

recently an interesting question came to my mind...

We all know that a class template can be specialized on one or more
parameters:

template <typename, int>
struct Foo;

template <int I>
struct Foo<int, I> { };

template <typename T>
struct Foo<T, 42> { };

etc.

Now, if Bar has a template-template-parameter, can I specialize on it too?

template <typename> class A;
template <typename> class B;

template <template <typename> class T>
struct Bar;

template <>
struct Bar<A> { };

template <>
struct Bar<B> { };	// legal C++?

I have no compiler yet to make empirical testing...

What does the standard say on this topic?

	Gabor
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



