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

2024-12-19


2958. Overload resolution involving lvalue transformation and qualification conversion

Section: 12.2.4.3  [over.ics.rank]     Status: open     Submitter: Vincent X     Date: 2024-11-10

(From submission #636.)

The following example in 12.2.4.3 [over.ics.rank] bullet 3.2.5 is not in harmony with the normative rules:

  int g(const int*);         //#1
  int g(const volatile int* const&); //#3
  int* p;
  int k = g(p);          // calls g(const int*)

The invocation of #1 requires an lvalue-to-rvalue conversion followed by a qualification conversion; #2 requires only a qualification conversion.

Possible resolution:

Change in 12.2.4.3 [over.ics.rank] bullet 3.2.5 as follows: