]> gcc.gnu.org Git - gcc.git/commit
c++: C++23 operator[] allows default arguments
authorJason Merrill <jason@redhat.com>
Tue, 6 Sep 2022 18:18:39 +0000 (14:18 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 6 Sep 2022 20:20:41 +0000 (16:20 -0400)
commit0a2fba3697411c07a8330abfe7460ce62bce5e7f
tree12fda6644d4eba70bc673e621d8c5d37764aeaf4
parent0a4a2667dc115ca73b552fcabf8570620dfbe55f
c++: C++23 operator[] allows default arguments

This usage was intended to be allowed by P2128, but it didn't make it into
the final wording.  Fixed by CWG 2507.

DR2507

gcc/cp/ChangeLog:

* decl.cc (grok_op_properties): Return sooner for C++23 op[].

gcc/testsuite/ChangeLog:

* g++.dg/cpp23/subscript8.C: New test.
gcc/cp/decl.cc
gcc/testsuite/g++.dg/cpp23/subscript8.C [new file with mode: 0644]
This page took 0.062867 seconds and 6 git commands to generate.