Modify

Ticket #8802 (closed Feature Requests: fixed)

Opened 9 months ago

Last modified 5 months ago

Add is_copy_constructible<T> trait

Reported by: apolukhin Owned by: apolukhin
Milestone: Boost 1.55.0 Component: type_traits
Version: Boost 1.54.0 Severity: Problem
Keywords: has_copy_constructor is_copy_constructible move traits Cc:

Description

Add an implementation of is_copy_constructible<T> trait. It must work with C++11 and in C++03 it must detect constructors assuming that if type is derived from boost::noncopyable or uses BOOST_MOVABLE_BUT_NOT_COPYABLE macro - it has no copy constructor.

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

Attachments

Change History

comment:1 Changed 9 months ago by apolukhin

  • Owner changed from johnmaddock to apolukhin
  • Status changed from new to assigned

comment:2 Changed 9 months ago by apolukhin

(In [84987]) Added is_copy_constructible triat implementation and tests (refs #8802)

comment:3 Changed 9 months ago by apolukhin

(In [85002]) Improvemants for is_copy_constructible triat (refs #8802):

  • Added small in-place documentation for trait
  • Trait is now included by boost/type_traits.hpp header
  • Added qbk documentation
  • Documentation regenerated

comment:4 Changed 9 months ago by apolukhin

(In [85006]) Fix tests build under MSVC for is_copy_constructible triat (refs #8802)

comment:5 Changed 9 months ago by apolukhin

(In [85060]) Fix tests for is_copy_constructible triat and fix reference-to-reference issue (refs #8802).

comment:6 Changed 9 months ago by apolukhin

(In [85104]) Unify behavior of is_copy_constructible triat when dealing with rvalues + add comments for some tests (refs #8802):

comment:7 Changed 9 months ago by apolukhin

(In [85173]) Workaround some of the Intel warinings/bugs in the is_copy_constructible_tests file (refs #8802)

comment:8 Changed 9 months ago by apolukhin

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

comment:9 Changed 9 months ago by apolukhin

(In [85222]) Atempt to workaround Intel issue with SFINAE (refs #8802)

comment:10 Changed 8 months ago by apolukhin

(In [85319]) Intel compiler: do not use SFINAE with decltype/sizeof on deleted functions. Use fallback mode instead (refs #8802)

comment:11 Changed 8 months ago by apolukhin

(In [85357]) Disable tests that can not be passed by intel compiler due to its usege of the is_copy_constructible trait in C++98/fallback mode (beacause of the bugs in SFINAE for deleted functions). (refs #8802)

comment:12 Changed 5 months ago by apolukhin

  • Status changed from assigned to closed
  • Resolution set to fixed

This issue was fixed in 1.55

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.