|
Boost : |
Subject: Re: [boost] [move][container] Review Request (new versions of Boost.Move and Boost.Container in sandbox and vault)
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2009-08-28 04:18:41
Ion Gaztañaga wrote:
> It's not trivial... And if we more than 2 overloads for each parameter,
> we'll need to produce a ton of preprocessed code ;-)
>
> Best,
>
> Ion
I've used Boost.Preprocessor to generate 2^n overloads of T&/const T&
combinations (based on a post here not too long ago) (when
BOOST_HAS_RVALUE_REFS isn't defined) and some additional metaprogramming
to capture explicitly generated rvalues (from boost::move), so I think
the only thing that's missing is capturing automatically generated
rvalues. Right now I hack it with a force_move free function that
const_cast/static_cast's its argument to rv<T>& and apply it to auto
rvalues.
- Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk