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.
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:
a trait detects an explicitly defaulted special member function, and
the implicit except specification of that function would be noexcept(true), but
the function is explicitly marked with noexcept(false).
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.
[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.
Modify [tab:meta.unary.prop], Table 54 Type property predicates, as indicated:
| Template | Condition | Preconditions |
|---|---|---|
| ... | ... | ... |
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])
|
T and all types in the template parameter pack Args shall be complete types,
cv void, or arrays of unknown bound.
|
| ... | ... | ... |