Boost logo

Boost :

Subject: [boost] move library / trait needed (was: [move] New version with move-aware containers library)
From: David Abrahams (dave_at_[hidden])
Date: 2009-04-30 13:27:03

on Sun Apr 12 2009, Ion Gaztañaga <> wrote:

> Hi to all,
> Sorry for the delay, but finally I've found some time to uploaded a new version of
> Boost.Move:
> Sandbox:
> ZIP file with docs:
> Online docs:

Hi Ion,

are you familiar with

Until the committee decides exactly how to handle it and compilers catch
up with the feature they add, we need a workaround for that problem,
both for C++03 and C++0x. The simplest approach requires a trait called
has_nothrow_move<T> which can be used to SFINAE-out pair's move
constructor unless its members all have a nonthrowing move constructor.
It would be reasonable to say

   template <class T>
   struct has_nothrow_move : has_move_constructor {};

as a default, since move constructors shouldn't throw. But still, we
need an implementation of has_move_constructor. Obviously, that will
require compiler support to be optimal, but in the meantime it can be

Now, the rub: I'd like to have has_nothrow_move in place in the Boost
SVN by the time BoostCon starts (Monday), so we can use it for

What do you think; can we get this integrated with your library and
checked in? I think we'll all be doing our BoostCon work on a branch
anyway, so it's reasonable to consider just checking the move
constructor stuff in on a branch of the Boost trunk.


Dave Abrahams
BoostPro Computing

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