Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8842 closed Patches (fixed)

BOOST_MOVABLE_BUT_NOT_COPYABLE and is_copy_constructible<T> trait

Reported by: Antony Polukhin Owned by: Ion Gaztañaga
Milestone: Boost 1.55.0 Component: move
Version: Boost 1.54.0 Severity: Showstopper
Keywords: Cc:

Description

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

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by Antony Polukhin

Severity: ProblemShowstopper

This ticket blocks #8802, which blocks #7888

comment:2 Changed 4 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

(In [85180]) Fixes #8842.

comment:3 Changed 4 years ago by Antony Polukhin

(In [85193]) Test is_copy_constructible trait on C++03/98 with Boost.Move emulation of noncopyable-movable type (refs #8802, refs #8842)

comment:4 Changed 4 years ago by Antony Polukhin

If it is possible and all the tests pass well, can this fix be merged into release branch in nearest one and a half weeks? I'm a little bit frightened that there'll be not enough time to merge and release-test TypeTraits? and CircularBufer? changes.

comment:5 Changed 4 years ago by Ion Gaztañaga

Ok, I'll merge it into the release branch ASAP.

comment:6 Changed 4 years ago by Ion Gaztañaga

Merged, thanks for the bug report.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.