Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#7911 closed Feature Requests (fixed)

Mark move constructors and move assignments of varint with BOOST_NOEXCEPT_IF

Reported by: Antony Polukhin Owned by: Antony Polukhin
Milestone: Boost 1.56.0 Component: variant
Version: Boost 1.53.0 Severity: Problem
Keywords: variant rvalues noexcept move Cc: shane.turner@…

Description

According to N3050 sequence containers can use move constructors/assignments of underling type only if underling types constructor/assignment is marked with noexcept.

We can determinate, if move constructor/assignment of variant can throw and mark it with BOOST_NOEXCEPT_IF(constexpr_value).

Attachments (1)

varant_noexcept.patch (3.8 KB ) - added by Antony Polukhin 9 years ago.
Patch to resolve this issue

Download all attachments as: .zip

Change History (12)

comment:1 by Shane Turner <shane.turner@…>, 10 years ago

Cc: shane.turner@… added

by Antony Polukhin, 9 years ago

Attachment: varant_noexcept.patch added

Patch to resolve this issue

comment:2 by Antony Polukhin, 9 years ago

(In [85079]) Added code (and tests) to mark move constructors and move assignemnt of Boost.Variant as noexcept if possible (refs #7911)

comment:3 by Antony Polukhin, 9 years ago

Owner: changed from ebf to Antony Polukhin
Status: newassigned

comment:4 by Antony Polukhin, 9 years ago

(In [85089]) Temporary disable noexcept detection for move assignment for Boost.Variant (exception specification detection for assignment requires call to is_nothrow_move_assignable for each type. But GCC 4.6 fails to do that and complains about incomplete types ) (refs #7911)

comment:5 by Antony Polukhin, 9 years ago

(In [85157]) Merge from trunk:

  • make the library work on exception-disabled environments (fixes #8717)
  • fix compilation of Boost.Variants move assignment for situations when one of the variant template classes has nothrow copy constructor and throwing move constructor (fixes #8772)
  • mark move constructor of variant with BOOST_NOEXCEPT_IF (refs #7911)

comment:6 by viboes, 9 years ago

Anthony please, could you add the new features to the documentation?

in reply to:  6 comment:7 by Antony Polukhin, 9 years ago

Replying to viboes:

Anthony please, could you add the new features to the documentation?

Work on this ticket is still slowly going on (GCC 4.6 has some issues). I'll update the documentation later, when as all the coding will be done.

comment:8 by Antony Polukhin, 9 years ago

(In [86054]) Mark move assignment with noexcept if possible (refs #7911)

comment:9 by Antony Polukhin, 9 years ago

(In [86135]) Detect noexcept specification for default constructor of variant (refs #7911)

comment:10 by Antony Polukhin, 9 years ago

Resolution: fixed
Status: assignedclosed

(In [86650]) Merge from trunk:

  • dropped support of antique compilers
  • fixed issue with ambiguity in swap (fixes #2839)
  • added conditional noexcepts to move assignments, default and move constructors (fixes #7911)
  • experimental variadic templates support (refs #9163)
  • bunch of size optimizations for assignments and move assignments (refs #7960)
  • minor changes and size optimizations

comment:11 by Antony Polukhin, 9 years ago

Milestone: To Be DeterminedBoost 1.56.0
Note: See TracTickets for help on using tickets.