A RetroSearch Logo

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

Search Query:

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

CWG Issue 1502

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

2025-04-13

1502. Value initialization of unions with member initializersSection: 9.5  [dcl.init]     Status: CD3     Submitter: Richard Smith     Date: 2012-05-06

[Moved to DR at the April, 2013 meeting.]

According to 9.5 [dcl.init] paragraph 7,

To value-initialize an object of type T means:

In an example like

  union U { int a = 5; };
  int main() { return U().a; }

this means that the value returned is 0, because none of the first three bullets apply. Should the “non-union” restriction be dropped from the second bullet?

Proposed resolution (October, 2012):

Change 9.5 [dcl.init] paragraph 7 as follows:

To value-initialize an object of type T means:


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