A RetroSearch Logo

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

Search Query:

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

CWG Issue 1288

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

1288. Reference list initializationSection: 9.5.5  [dcl.init.list]     Status: CD3     Submitter: Daniel Krügler     Date: 2011-04-06

[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]

One might expect that in an example like

  int i;
  int & ir{i};

ir would bind directly to i. However, according to 9.5.5 [dcl.init.list] paragraph 3, this example creates a temporary of type int and binds the reference to that temporary:

Also, the “or reference” in the last bullet is dead code, as a reference initialization is always handled by the preceding bullet.

Proposed resolution (August, 2011):

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


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