This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

3967. The specification for std::is_nothrow_* traits may be ambiguous in some cases involving noexcept(false)

Section: 21.3.6.4 [meta.unary.prop] Status: New Submitter: Jiang An Opened: 2023-08-04 Last modified: 2025-10-18

Priority: 3

View other active issues in [meta.unary.prop].

View all other issues in [meta.unary.prop].

View all issues with New status.

Discussion:

std::is_nothrow_* traits are currently specified in the form "(some operation) is known not to throw any exceptions". Under the following circumstance, the current specification may be ambiguous:

It seems that an implementation may decompose the defaulted special member function and then conclude that the trait should give a true result, or may just use the exception specification which gives a false result.

Implementors seemingly hold different opinions, see GCC Bug 106611 and this blog post.

Perhaps we may need to clarify that the implementation divergence is permitted, or unambiguously specify these traits to give results consistent with exception specifications.

[2025-10-17; Reflector poll.]

Set priority to 3 after reflector poll.

"NAD, this was just a GCC bug."

[2025-10-18; Arthur provides wording]

Proposed resolution:

This wording is relative to N5014.

  1. Modify [tab:meta.unary.prop], Table 54 Type property predicates, as indicated:

    TemplateConditionPreconditions
    .........
    template<class T, class... Args>
    struct is_nothrow_constructible;
    
    is_constructible_v<T, Args...> is true and the variable definition for is_constructible, as defined below, contains no potentially-throwing expression (14.5 [except.spec]) is known not to throw any exceptions (7.6.2.7 [expr.unary.noexcept]). T and all types in the template parameter pack Args shall be complete types, cv void, or arrays of unknown bound.
    .........