Modify

Opened 5 years ago

Closed 5 years ago

#8189 closed Feature Requests (fixed)

Port some type traits from Boost.Variant

Reported by: Antony Polukhin Owned by: Antony Polukhin
Milestone: Boost 1.54.0 Component: type_traits
Version: Boost 1.52.0 Severity: Problem
Keywords: rvalues move trivial Cc: john@…

Description (last modified by Antony Polukhin)

Boost.Varaint has the following traits, that can be used across modules and sould be ported to Boost.TypeTraits?

has_nothrow_move_assign
has_nothrow_move_constructor
has_trivial_move_assign
has_trivial_move_constructor

Implementation may be tuned to use C++11 features it they are available.

Attachments (1)

type_traits.patch (68.5 KB) - added by Antony Polukhin 5 years ago.
Initial patch (no documentation, but there are some tests)

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by Antony Polukhin

Attachment: type_traits.patch added

Initial patch (no documentation, but there are some tests)

comment:1 Changed 5 years ago by Antony Polukhin

Description: modified (diff)
Status: newassigned

Current patch has following issues, that must be solved before merging:

  • has_* functions must be renamed to is_*able to better reflect their behavior and to have more conformance with C++11
  • is_pod<T>::value || __has_trivial_move_assign(T) and is_pod<T>::value || __has_trivial_move_constructor(T) must be added to Clang and VC11 intrinsics
  • tests for detection of triviality and noexcept of user defined move operators and constructors on compilers with noexcept support

comment:2 Changed 5 years ago by Antony Polukhin

(In [83206]) Added new type traits (more documentation, more tests and improved C++11 specific features detection still must to be done) (refs #8189)

comment:3 Changed 5 years ago by John Maddock

Cc: john@… added

comment:4 Changed 5 years ago by Antony Polukhin

(In [83241]) Added documentation for new type traits (refs #8189) HTML pages regenerated (refs #8189)

comment:5 Changed 5 years ago by Antony Polukhin

(In [83245]) Fix MSVC11 test (refs #8189). Added C++11 noexcept implementation of is_nothrow_move_constructible and is_nothrow_move_assignable traits and changed C++03 version to to work close to C++11 (refs #8189).

comment:6 Changed 5 years ago by Antony Polukhin

(In [83365]) Added C++11 specific tests for implementation of is_nothrow_move_constructible and is_nothrow_move_assignable traits (refs #8189).

comment:7 Changed 5 years ago by Antony Polukhin

(In [83430]) Added missing header for is_nothrow_move_constructible (refs #8189).

comment:8 Changed 5 years ago by Antony Polukhin

Resolution: fixed
Status: assignedclosed

This was merged to release branch and Boost.Variant already successfully uses new traits from release branch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Antony Polukhin.
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.