Title
Does is_nothrow_convertible consider destruction of the destination type?
Status
new
Section
[meta.rel]
Submitter
Jiang An

Created on 2019-02-10.00:00:00 last changed 11 months ago

Messages

Date: 2023-12-15.00:00:00

[ 2023-12-22; Daniel comments ]

This issue should be resolved by LWG 4028.

Date: 2020-03-11.00:00:00

[ 2020-03-11 Issue Prioritization ]

Priority to 3 after reflector discussion.

Date: 2020-02-15.00:00:00

[ 2020-02-22, Daniel comments ]

This seems to be quite related to the existing issue LWG 2116.

Date: 2019-02-10.00:00:00

This issue was submitted after a previous editorial change request had been rejected by the project editors.

I find that all known implementations (at least msvcstl, libc++, libstdc++ and the sample in P0758R1) of std::is_nothrow_convertible may be not clear enough to indicate that whether destruction of the destination type is considered (or not).

For example, given a type Weird defined as

struct Weird 
{
  Weird(int) noexcept {}
  ~Weird() noexcept(false) {}
};

Then std::is_nothrow_convertible_v<int, Weird> is false in every known implementation. However, it seems that the conversion itself is noexcept.

History
Date User Action Args
2023-12-22 12:45:58adminsetmessages: + msg13899
2020-03-11 18:59:36adminsetmessages: + msg11162
2020-02-22 10:19:06adminsetmessages: + msg11135
2019-02-10 00:00:00admincreate