Opened 4 years ago

Closed 4 years ago

#8802 closed Feature Requests (fixed)

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:


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 :

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

Attachments (0)

Change History (12)

comment:1 Changed 4 years ago by apolukhin

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

comment:2 Changed 4 years ago by apolukhin

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

comment:3 Changed 4 years 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 4 years ago by apolukhin

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

comment:5 Changed 4 years ago by apolukhin

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

comment:6 Changed 4 years 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 4 years ago by apolukhin

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

comment:8 Changed 4 years 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 4 years ago by apolukhin

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

comment:10 Changed 4 years 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 4 years 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 4 years ago by apolukhin

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

This issue was fixed in 1.55

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain apolukhin.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.