Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-04-20 21:04:16


At 04:17 PM 4/20/00 +0100, Moore, Paul wrote:
>From: Dave Abrahams [mailto:abrahams_at_[hidden]]
>>
>> There is no conforming way to extend std::swap for
>> user-defined templates.
>
>Is this just true for std::swap? Or does it apply to other functions in
>std::? I had similar problems with std::abs (for the rational number class)
>which sort-of transmogrified into the swap issue. Steve Cleary just sent me
>a copy of a defect report by Alan Griffiths, which describes the problem
>using swap(), but which says that the use of swap is just because "the
>problem here is particularly acute".

The committee's Library Working Group now has this as an issue: 226
"Partial specialization of function templates in namespace std." The LWG
looked at the issue in Tokyo, and agrees that there is a problem. No easy
solutions were identified, and it looks to me like this one is going to be
difficult to fix and may require a core language change.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk