Boost logo

Boost :

Subject: Re: [boost] [type_traits] copy constructor
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2011-09-30 09:42:06

John Maddock-3 wrote:
>>> The proposed Boost.Conversion provides some interesting traits (included
>>> in C++11) that you could be interested in.
>>> is_constructible, is_default_constructible, is_copy_constructible,
>>> is_move_constructible as well as is_assignable, is_copy_assignable and
>>> is_move_assignable.
>>> If John is interested in we can work together to include them in
>>> TypeTraits.
> For sure, care to provide a submission/patch?
> Thanks, John.

If these (IMO very useful) traits are added, I'd suggest to have macros
#defined when the traits can actually do the job-- same as

For example, I'd use it this way:

template< typename T >
struct has_oldof :
    boost::has_copy_constructor<T> // from Boost.Conversion's
    boost::mpl::true_ // user specializes has_oldof when can't copy T :(


View this message in context:
Sent from the Boost - Dev mailing list archive at

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