Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-08-22 12:02:21


on Fri Aug 22 2008, "Niels Dekker - mail address until 2008-12-31" <nd_mail_address_valid_until_2008-12-31-AT-xs4all.nl> wrote:

> Michael Marcin wrote:
>> Could we specialize std::_Move_operation_category for this version of
>> VC9 to enable this optimization for boost types that can benefit from
>> it? http://tinyurl.com/6h298c
>
> Thanks for the link! I just did some promotion of the new boost::swap
> utility at the blogs.msdn.com/vcblog site :-)
>
> Shouldn't this MSVC optimization be enabled for /any/ type that has a
> custom swap function? Typically such a type has a swap member
> function as well. So can't this std::_Move_operation_category be
> specialized based on some template meta programming (e.g.,
> has_swap_member<T>::value)? Such an approach looks preferable to me
> than adding a macro call (BOOST_MSVC_FAST_SWAP_OPTIMIZATION) for each
> type that has a custom swap.

I don't know what member functions have to do with it; the real
criterion is whether or not there's a swap available for it via ADL.



-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com



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