|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-08-19 13:01:11
> > A specialization would be legal. However std::swap is a
> > function template and the language does not support partial
> > function template specializations.
> >
> > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#226
> > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2001/n1296.htm
Be interesting to see the proposed syntax.
Here's mine:
// primary template
template<class T, class U> void f(T,U);
// specialisation
template<class X> template<class T=X, class U=X> void f(T,U);
There isn't any alternative to fully repeating the whole
signature. Unless I'm mistaken, this ALSO applies to
full specialisations, which means the current syntax is
plainly wrong.
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk