Topic: Template specializations
Author: Roman Lechtchinsky <wolfro@cs.tu-berlin.de>
Date: 1996/07/09 Raw View
The DWP seems not to mention if and how template template parameters can be
specialized. Suppose C is declared as
template<class T> class C {};
Now I want to specialize C for arguments of the form X<Y>. Is this legal:
template<class Y, template<class T> class X> class C<X<Y> > {};
BTW, am I right in assuming that this:
template<template<class T> class X> class C<X> {};
is illegal? The January WP says:
"The argument list of the specialization shall not be identical to
the implicit argument list of the primary template." [temp.class.spec],
but I'm not sure if this passage covers this case.
Bye
Roman
---
[ 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 ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]