Subject: [Boost-bugs] [Boost C++ Libraries] #8842: BOOST_MOVABLE_BUT_NOT_COPYABLE and is_copy_constructible<T> trait
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-18 06:52:22
#8842: BOOST_MOVABLE_BUT_NOT_COPYABLE and is_copy_constructible<T> trait
--------------------------+------------------------
Reporter: apolukhin | Owner: igaztanaga
Type: Patches | Status: new
Milestone: Boost 1.55.0 | Component: move
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
--------------------------+------------------------
There is a ticket #8802 to add is_copy_constructible<T> trait.
Unfortunately, for correct work of that trait in C++03/C++98 with
`BOOST_MOVABLE_BUT_NOT_COPYABLE` macro some changes for Boost.Move are
required.
Boost.Move requires the following patch applied to 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
}}}
Some tests for that case already exist in
`boost/type_traits/is_copy_constructible.hpp`, I'll uncomment them when
this patch will be applied.
Motivation: Without that patch it is impossible to have a nice
implementation of `move_if_noexcept`, that is going to be used by
Boost.CircularBuffer and may be used by other containers.
P.S.: If you wish and have no spare time, I can apply this patch and add
some tests to Boost.Move
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8842> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC