This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114b. See for the official list.


2789. Overload resolution with implicit and explicit object member functions

Section:  []     Status: DRWP     Submitter: Corentin Jabot     Date: 2023-08-08

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


  template <typename T = int>
  struct S {
    constexpr void f();                      // #1
    constexpr void f(this S&) requires true; // #2

  void test() {
    S<> s;
    s.f();                 // #3

With the current rules, the call at #3 is ambiguous, even though #2 is more constrainted.

Proposed resolution (approved by CWG 2023-11-07):

Change in [] bullet 2.6 as follows: