Opened 7 years ago

Closed 6 years ago

#11696 closed Bugs (fixed)

variant& operator=(variant&& rhs) never noexcept under clang

Reported by: Tobias Reh <treh@…> Owned by: Antony Polukhin
Milestone: Boost 1.62.0 Component: variant
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

The noexcept specification for variant's move assignment operator is compiled only conditionally under the following preprocessor switch:

#if !defined(__GNUC__) || (__GNUC__ != 4) || (__GNUC_MINOR__ > 6)

clang 3.6 defines the gnu macros as if it were gcc 4.2. Therefore the above switch evaluates to false and the noexcept specification is not visible under clang.

Change History (4)

comment:1 by Tobias Reh <treh@…>, 7 years ago

Component: Nonevariant
Owner: set to ebf

comment:2 by Antony Polukhin, 6 years ago

Milestone: To Be DeterminedBoost 1.62.0
Owner: changed from ebf to Antony Polukhin
Status: newassigned

comment:3 by Antony Polukhin, 6 years ago

Fixed in 5bfb9db, will be merged to master branch as soon as all the regression tests pass.

Thanks for the report!

comment:4 by Antony Polukhin, 6 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.