|
Boost : |
From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2008-07-31 09:11:59
Joseph Gauterin wrote:
> Am I correct in thinking that it's permissible to provide a template
> specialization of a function in namespace std but not an overload?
Yes, you are. :-) According to both the current C++ Standard and the
latest Working Draft. The Draft
www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf says at
17.4.3.1.1, Namespace std [namespace.std]:
"The behavior of a C++ program is undefined if it adds declarations or
definitions to namespace std or to a namespace within namespace std
unless otherwise specified. A program may add a template specialization
for any standard library template to namespace std only if the
declaration depends on a user-defined type of external linkage and the
specialization meets the standard library requirements for the original
template."
Kind regards, Niels
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk