|
Boost : |
Subject: Re: [boost] [type_traits] copy constructor
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2011-09-29 13:12:18
Vicente Botet wrote:
>
> Le 29/09/11 04:57, Lorenzo Caminiti a écrit :
>> Hello all,
>>
>> What's the most portable way to detect if a type T is CopyConstructible?
>>
>> Actually, I would need a metafunction that is true_ iff a type T has a
>> const-correct copy construct:
>>
>> T::T( T const& other) { /* copy this T from the other T */ }
>>
>> (I've been looking at boost::has_trivial_copy and
>> boost::has_nothrow_copy but I wanted to double check with the ML.)
>>
>>
> Hi,
>
> 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.
>
Thanks a lot Vicente. For now, I'm sticking with C++03 but I have a list of
extra features that Boost.Contract could support with C++11 for future work.
I'll add this (important) feature to the list.
--Lorenzo
-- View this message in context: http://boost.2283326.n4.nabble.com/type-traits-copy-constructor-tp3854192p3856720.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk