A RetroSearch Logo

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

Search Query:

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

CWG Issue 2919

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

2919. Conversion function candidates for initialization of const lvalue referenceSection: 12.2.2.7  [over.match.ref]     Status: DRWP     Submitter: Brian Bi     Date: 2024-07-18

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

There is implementation divergence handling the following example:

  struct A {
    A(const A&) = delete;
  };
  struct B {
    operator A&&();
  };
  const A& r = B();

Conversion to an lvalue pursuant to 9.5.4 [dcl.init.ref] bullet 5.1 fails due to the attempt to invoke a deleted function, but conversion to an rvalue according to 9.5.4 [dcl.init.ref] bullet 5.3 would succeed, except that 12.2.2.7 [over.match.ref] bullet 1.1 hinges on the target type of the initialization, not the target type of the conversion.

Proposed resolution (approved by CWG 2024-08-16):

Change in 12.2.2.7 [over.match.ref] bullet 1.1 as follows:

Let R be a set of types including for any T2.

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