From: Beman Dawes (beman_at_[hidden])
Date: 1999-12-10 20:32:37
At 11:18 PM 12/10/99 +0100, Gabriel Dos Reis wrote:
| Programs are definitely allowed (and recommended) to specialize
| templates like std::swap and std::less; in fact my recent change to
| smart_ptr.hpp does just that.
>Stop. You can't specialize a template function. You *overload* it.
>differents things; althought they might be seen as having similar
14.7 [temp.spec] Template instantiation and specialization (para 3)
An explicit specialization may be declared for a function
a class template, a member of a class template or a member
The standard goes on to give many examples of specialized function
templates. Also see 14.7.3.
Perhaps what you meant was "You can't *partially* specialize a
function template." That is correct AFAIK.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk