[type_triats] [move] is_copy_constructible<T> trait

Hi, 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 : #ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ private:\ TYPE(TYPE &);\ TYPE& operator=(TYPE &);\ + public: \ + typedef int boost_move_no_copy_constructor_or_assign; \ + private: \ // #else 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

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)?
Please do! Thanks, John.

2013/7/9 John Maddock
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)?
Please do!
Working on that... Created a ticket: https://svn.boost.org/trac/boost/ticket/8802. -- Best regards, Antony Polukhin

2013/7/9 John Maddock
Please do!
I've added the trait and it passes all the regression tests. I've also updated the documentation. Ion already merged the Boost.Move part to release so is_copy_constructible is ready for release. John, take a look at it and if everything is OK with that trait, please merge it to release (or tell me, and I'll merge it). https://svn.boost.org/trac/boost/ticket/8802 -- Best regards, Antony Polukhin

I've added the trait and it passes all the regression tests. I've also updated the documentation.
Ion already merged the Boost.Move part to release so is_copy_constructible is ready for release.
John, take a look at it and if everything is OK with that trait, please merge it to release (or tell me, and I'll merge it). https://svn.boost.org/trac/boost/ticket/8802
Done. Many thanks! John.
participants (2)
-
Antony Polukhin
-
John Maddock