Boost logo

Boost :

Subject: [boost] [type_triats] [move] is_copy_constructible<T> trait
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2013-07-09 02:26:37


I have an implementation of is_copy_constructible<T> trait. It works great
with C++11, in C++03 it detects constructors assuming that if type is
derived from boost::noncopyable or uses BOOST_MOVABLE_BUT_NOT_COPYABLE
macro - it has no copy constructor.

Questions are:
* May I add that trait to trunk version of Boost.TypeTraits (with
documentation and tests, as usual)?
* May I or Boost.Move maintainer apply this patch to
BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN in boost/move/core.hpp :

      TYPE(TYPE &);\
      TYPE& operator=(TYPE &);\
+ public: \
+ typedef int boost_move_no_copy_constructor_or_assign; \
+ private: \

Why do I need this trait? Well, it allows to implement move_if_noexcept()
that is required for circular_buffer and possibly for other containers.

Best regards,
Antony Polukhin

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