Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US 12-041 7.5.5 [expr.prim.lambda] Static call operator for lambdas #486

Closed
wg21bot opened this issue Oct 30, 2022 · 1 comment
Closed
Labels
EWG Evolution needs-paper rejected No consensus for a change.
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 30, 2022

With the adoption of P1169 (static operator()), lambdas with no capture can have a static call operator. But only if someone explicitly writes that in code. That seems hostile to new code, which now has to write more annotation just in case it might matter for performance.

Proposed change:

Consider making the static-ness of the call operator implementation-defined, so that compilers can make this a switch.

@wg21bot wg21bot added the EWG Evolution label Oct 31, 2022
@jensmaurer jensmaurer changed the title US 7.5.5 [expr.prim.lambda] Static call operator for lambdas US 12-041 7.5.5 [expr.prim.lambda] Static call operator for lambdas Nov 3, 2022
@jensmaurer jensmaurer transferred this issue from another repository Nov 3, 2022
@jensmaurer jensmaurer added this to the CD C++23 milestone Nov 3, 2022
@jfbastien jfbastien added the rejected No consensus for a change. label Nov 8, 2022
@erichkeane
Copy link

erichkeane commented Nov 8, 2022

Make the staticness of a capture-less lambda operator() implementation defined for C++23, as proposed in the NB comment.

SF F N A SA
0 0 3 15 6

Result: No Consensus for change: Recommend to Reject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EWG Evolution needs-paper rejected No consensus for a change.
Projects
None yet
Development

No branches or pull requests

4 participants