Boost logo

Boost :

Subject: Re: [boost] [Review] Formal Review: Boost.Move
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2010-05-16 04:08:12

On 16/05/10 03:10, Jeffrey Lee Hellrung, Jr. wrote:
> On 5/15/2010 4:26 PM, vicente.botet wrote:
>> * As the standard uses these more specific ones
>> template<class T> struct has_nothrow_move_constructor;
>> template<class T> struct has_nothrow_move_assign;
>> Shouldn't Boost.Move use these
> What are the implementations of these? Can you give a reference
> confirming they are in the (upcoming) standard?

They're in N3092, [meta.unary.prop]. The first is defined as

has_trivial_move_constructor<T>::value is true or
is_nothrow_constructible<U, U&&>::value is true, where U is

the second as

has_trivial_move_assign<T>::value is true and T is a trivial type (3.9)
or the expression noexcept(*(U*)0 = declval<U>()) is well-formed and
true, where U is remove_all_extents<T>::type.

I didn't know about noexcept expressions before. I wonder when they'll
make it into g++...

John Bytheway

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