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

2024-11-11


2787. Kind of explicit object copy/move assignment function

Section: 11.4.4  [special]     Status: open     Submitter: Corentin Jabot     Date: 2023-08-08

Consider:

  struct S {
    auto & operator=(this S &, S&&);
    auto & operator=(this S &, const S&);
  };

The rule in 11.4.4 [special] paragraph 5 does not treat explicit-object member functions correctly:

Two special member functions are of the same kind if:

Possible resolution:

Change in 11.4.4 [special] paragraph 5 as follows:

Two special member functions are of the same kind if: