$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [Review] Formal Review: Boost.Move - add'l suggestions / questions
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2010-05-12 16:08:34
On 05/06/2010 08:36 PM, OvermindDL1 wrote:
> Greetings Boost Developers and Users,
>
> It's my pleasure to announce that the review of Ion Gaztañagas' Move
> library starts May 10th and lasts until May 24th, 2010, unless an
> extension occurs.
I don't think, as implemented, is_movable works for non-class types (at 
least that used to be the case, and I think the only change in the 
implementation has been the introduction of a boost::mpl::bool_).  I 
think for non-class types T, at least in c++03, is_movable<T> should 
evaluate to false without causing a compiler error.
I don't recall seeing anything concerning has_nothrow_move other than a 
short description about how it defaults to false and could hurt 
performance if not specialized.  Can you explain the intended use for 
has_nothrow_move?  Is this related to N2983 [1]?  Speaking of which, do 
you have any idea what the status of throwing move constructors is as 
far as the c++ committee is concerned, whether you agree with the 
resolution provided by N2983, and if so, have you thought about 
providing move_if_noexcept (or something similar)?
If has_nothrow_move turns out to be widely used, it may be a good idea 
to package the "no-throw-ness" of the move constructor within a move 
emulation enabling macro (ENABLE_NOTHROW_MOVABLE), e.g., by defining a 
typedef that has_nothrow_move can detect, or maybe a boolean static 
constant within the class indicating whether the move constructor 
throws, so that you can make the "no-throw" property conditional on the 
"no-throw-ness" of member objects.  In any case, one step at a time...
As far as the utility of is_movable in c++0x, it looks like it's only 
used in uninitialized_move and uninitialized_copy_or_move.  This doesn't 
seem like enough justification to provide it for c++0x, since 
uninitialized_{copy_or_}move *could* be implemented without it just 
fine.  Furthermore, is_movable will only be true in c++0x if a movable 
type has a nested typedef boost_move_emulation_t, which seems to 
exclude, e.g., STL data structures.  I would think a simpler course of 
action would be to relegate is_movable to strictly c++03...
I've looked through the documentation and have typo suggestions, but 
I'll have to get to those later...
- Jeff
[1] https://svn.boost.org/svn/boost/sandbox/committee/rvalue_ref/N2983.html