Skip to content

CWG2507: Default arguments for operator[] #1217

@jensmaurer

Description

@jensmaurer

CWG would like EWG to confirm that default arguments were intended to be permitted for an operator[] function. See P2128R6 for the paper removing restrictions on overloaded operator[].

See CWG2507:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C++23Targeted at C++23CWGCoreplenary-approvedPapers approved for inclusion in their target vehicle by plenary vote.straw-pollStraw poll

    Type

    No type

    Projects

    Status

    Approved for plenary vote

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions