Boost logo

Boost :

Subject: Re: [boost] [utility] rvalue support in value_initialized
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-14 12:06:44


on Wed Sep 14 2011, "Claas H. Köhler" <claas.koehler-AT-dlr.de> wrote:

> Hi everybody!
>
> Recently I encountered a problem using the std:::unique_ptr within
> boost::spirit. The reason is apparently that value_initialized does
> not support rvalue assignment. Are there any plans to implement move
> semantics into value_initialized? Mainly I would be interested in
> making something like this work:
>
> std::unique_ptr<T> a= boost::get( boost::value_initialized<
> std::unique_ptr<T> >() );
>
> Currently this fails due to the fact, that unique_ptr can be moved but
> not copied.

No plans as far as I know, but I'm sure a patch would be welcome.

-- 
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