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.

3400. Does is_nothrow_convertible consider destruction of the destination type?

Section: 21.3.8 [meta.rel] Status: New Submitter: Jiang An Opened: 2020-02-10 Last modified: 2023-12-22

Priority: 3

View other active issues in [meta.rel].

View all other issues in [meta.rel].

View all issues with New status.

Discussion:

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++, 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.

[2020-02-22, Daniel comments]

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

[2020-03-11 Issue Prioritization]

Priority to 3 after reflector discussion.

[2023-12-22; Daniel comments]

This issue should be resolved by LWG 4028(i).

Proposed resolution:

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant