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

Section: 21.3.5.4 [meta.unary.prop] Status: New Submitter: Jiang An Opened: 2023-08-04 Last modified: 2023-08-05 12:06:58 UTC

Priority: Not Prioritized

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.

Proposed resolution: