Created on 2021-12-07.00:00:00 last changed 27 months ago
Proposed resolution (December, 2021):
Change 12.4.5 [over.sub] paragraph 1 as follows:
A subscripting operator function is a function named operator[] that is a non-static member function with an arbitrary number of parameters. It may have default arguments. For an expression...
Approved by EWG 2022-04-14.
Approved by CWG 2022-04-22.
[Accepted at the July, 2022 meeting.]
The intent of paper P2128R6, which permitted multiple parameters in overloaded subscript operators and was adopted at the October, 2021 plenary, was that overloaded operator[] should allow parameters with default arguments. However, the adopted wording did not address the following restriction from 12.4.1 [over.oper.general] paragraph 10:
An operator function cannot have default arguments (9.3.4.7 [dcl.fct.default]), except where explicitly stated below.
Similar wording to that of operator() should be added for operator[].
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-08-19 07:54:33 | admin | set | status: ready -> cd6 |
2022-04-22 21:07:05 | admin | set | status: review -> ready |
2022-01-06 00:00:00 | admin | set | messages: + msg6605 |
2021-12-07 00:00:00 | admin | create |