Bug 98942 - [C++23] Implement P1102R2 - Down with ()!
Summary: [C++23] Implement P1102R2 - Down with ()!
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL: https://wg21.link/p1102r2
Keywords: patch
Depends on:
Blocks: c++23-core
  Show dependency treegraph
 
Reported: 2021-02-02 20:00 UTC by Marek Polacek
Modified: 2021-03-25 15:58 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-02-02 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Polacek 2021-02-02 20:00:24 UTC
A proposal for removing unnecessary ()’s from C++ lambdas.

(Assuming this will be voted in.)
Comment 1 Marek Polacek 2021-02-25 18:49:29 UTC
This now has a patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-February/565886.html
Comment 2 Jakub Jelinek 2021-02-26 10:09:28 UTC
https://gcc.gnu.org/g:0f161cc8494cf7283a16fa9ebbcf8fd121bab68d

commit r11-7419-g0f161cc8494cf7283a16fa9ebbcf8fd121bab68d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 26 10:44:52 2021 +0100

    c++: Implement P1102R2 - Down with ()!
    
    The following patch implements P1102R2.
    For attributes, we have already attribute parsing before the parameter
    declarations and so when that is omitted, if the attributes are first we
    already accept it.
    
    2021-02-26  Jakub Jelinek  <jakub@redhat.com>
    
            * parser.c (cp_parser_lambda_declarator_opt): Implement
            P1102R2 - Down with ()! Make ()s optional before lambda specifiers
            for -std={c,gnu}++2b or with pedwarn in earlier versions.
    
            * g++.dg/cpp23/lambda-specifiers1.C: New test.

Feature test macro not added yet.
https://github.com/cplusplus/draft/pull/4513 doesn't mention anything.
Comment 3 Marek Polacek 2021-03-25 15:58:40 UTC
Implemented in GCC 11.