Re: [Boost-bugs] [Boost C++ Libraries] #7718: Basic rvalue and C++11 support (part 2)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7718: Basic rvalue and C++11 support (part 2)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-01-20 15:32:00


#7718: Basic rvalue and C++11 support (part 2)
---------------------------+------------------------------------------------
  Reporter: apolukhin | Owner: ebf
      Type: Patches | Status: reopened
 Milestone: Boost 1.53.0 | Component: variant
   Version: Boost 1.52.0 | Severity: Optimization
Resolution: | Keywords:
---------------------------+------------------------------------------------

Comment (by djowel):

 Let me quote in case you missed it:

 On 1/11/13 11:02 PM, Paul Smith wrote:
> On Fri, Jan 11, 2013 at 4:18 PM, Peter Dimov <lists_at_[hidden]> wrote:
>> If the variant could be empty, or equivalently, if the variant always
>> contained a type that can be reliably default-constructed (without an
>> exception) such as int, the problems with assignment (both copy- and
 move-)
>> and with move construction do not occur, because the target can be left
>> holding the int.
>>
>> So, one option is to enable move only in this case.
>
> That's the first constructive solution so far. Something like:
>
> template <typename T>
> struct is_legitimate_move_target // specialize me
> : has_trivial_constructor<T> {};

 Paul, I agree!

 Peter, I like the direction this is heading to. I really appreciate
 your interest in this.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7718#comment:11>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC