Boost logo

Boost :

Subject: Re: [boost] [utility] rvalue support in value_initialized
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-09-15 03:59:38

[reordering; please see]

2011/9/15 "Claas H. Köhler" <claas.koehler_at_[hidden]>

> On 09/14/2011 06:06 PM, Dave Abrahams wrote:
>> 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.
>> Principially I would like to contribute. I have to admit though, that I
> have never contributed to boost before.
> In my oppinion it should suffice to add move constructors/ move assignment
> to /utility/value_init.hpp, which I could do.
> How do we go on from there? Shall I submit the modified header file to this
> mailing list for review or what is the usual procedure?

I'm guessing it would probably be sufficient to submit a patch to an open
trac ticket (filed as a feature request). Documentation patches would
probably also be in order.

I think a big win would be to use Ion G's Boost.Move library to implement
the move constructor and move assignment operator. I *believe* this is
slated to be included with 1.48, but that's entirely up to Ion on whether
it's ready yet.

- Jeff

Boost list run by bdawes at, gregod at, cpdaniel at, john at