A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/2864.html below:

CWG Issue 2864

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-08-11

2864. Narrowing floating-point conversionsSection: 9.5.5  [dcl.init.list]     Status: DRWP     Submitter: Brian Bi     Date: 2023-11-04

[Accepted as a DR at the June, 2024 meeting.]

Consider:

  float f = {1e100};

This is rejected as narrowing on all implementations. Issue 2723 made the example non-narrowing, which seems incorrect on an IEEE platform.

Proposed resolution (approved by CWG 2024-04-19):

Change in 9.5.5 [dcl.init.list] paragraph 7 as follows:

A narrowing conversion is an implicit conversion

Additional notes (April, 2024)

According to the proposed wording, since NaNs are not finite, conversion of NaNs is always non-narrowing. However, the payload of the NaN might not be preserved when converting to a smaller floating-point type.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4