File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
regression-tests/test-results Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
2
- cppfront compiler v0.3.0 Build 8C02:1745
2
+ cppfront compiler v0.3.0 Build 8C03:1133
3
3
Copyright(c) Herb Sutter All rights reserved
4
4
5
5
SPDX-License-Identifier: CC-BY-NC-ND-4.0
Original file line number Diff line number Diff line change 1
- "8C02:1745 "
1
+ "8C03:1133 "
Original file line number Diff line number Diff line change @@ -4601,7 +4601,16 @@ class cppfront
4601
4601
if (!n.my_decl ->has_name ())
4602
4602
{
4603
4603
if (n.my_decl ->is_constexpr ) {
4604
- printer.print_cpp2 ( " constexpr" , n.position () );
4604
+ // The current design path we're trying out is for all '==' functions to be
4605
+ // emitted as Cpp1 'constexpr', including anonymous functions. For anonymous
4606
+ // functions that have captures, the intent is that '==' implies "the result
4607
+ // always the same (depends only on the arguments)." Specifically, the result
4608
+ // doesn't depend on the captured state, so the captured state should be const.
4609
+ // But until we want to take a dependency on C++23 (P2242) to make more lambdas
4610
+ // work with 'constexpr' even when not invoked in constexpr contexts, we will
4611
+ // emit it as const/whitespace instead for now.
4612
+ //
4613
+ // printer.print_cpp2( " constexpr", n.position() ); // deliberately disabled until future
4605
4614
}
4606
4615
else {
4607
4616
printer.print_cpp2 ( " mutable" , n.position () );
You can’t perform that action at this time.
0 commit comments