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
[Accepted as a DR at the November, 2023 meeting.]
Subclause 12.2.2.1 [over.match.funcs.general] paragraph 4 specifies:
For implicit object member functions, the type of the implicit object parameter iswhere X is the class of which the function is a member and cv is the cv-qualification on the member function declaration.
- “lvalue reference to cv X” for functions declared without a ref-qualifier or with the & ref-qualifier
- “rvalue reference to cv X” for functions declared with the && ref-qualifier
Since a member of some class C is also a member of any class derived from C, this specification is unclear.
Proposed resolution (approved by CWG 2023-08-25):
Change in 12.2.2.1 [over.match.funcs.general] paragraph 4 as follows:
For implicit object member functions, the type of the implicit object parameter iswhere X is the class of which the function is a direct member and cv is the cv-qualification on the member function declaration.
- “lvalue reference to cv X” for functions declared without a ref-qualifier or with the & ref-qualifier
- “rvalue reference to cv X” for functions declared with the && ref-qualifier