Boost logo

Boost :

Subject: [boost] [type_traits] copy constructor
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2011-09-28 22:57:46


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.)

Thanks a lot.
--Lorenzo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk