@@ -4733,18 +4733,26 @@ class cppfront
4733
4733
4734
4734
printer.preempt_position_push ( n.equal_sign );
4735
4735
4736
- // *** NOTE: This branch to emit the requires-clause should maybe be
4737
- // moved to location (A) above, so that it's also emitted
4738
- // on the function declaration. But doing that triggers a
4739
- // bug in GCC 10.x (that was fixed in 11.x), and 10.x is
4740
- // my main test compiler and works for everything else,
4741
- // and moving it up there would break 'forward' parameters
4742
- // with concrete types on GCC 10.x.
4743
- // So I'm not yet moving this code up to the declaration,
4744
- // given that so far things appear to be working well enough
4745
- // with the requires-clause on the function definition only...
4746
- // Handle requires clause - an explicit one plus any generated
4747
- // from processing the parameters
4736
+ // *** NOTE =====================================================
4737
+ //
4738
+ // This branch to emit the requires-clause should maybe be
4739
+ // moved to location (A) above, so that it's also emitted
4740
+ // on the function declaration. But moving it to (A) triggers
4741
+ // a bug in GCC 10.x (that was fixed in 11.x), where it would
4742
+ // break using a 'forward' parameter of a concrete type and
4743
+ // also explicitly user-written requires-clauses that do
4744
+ // similar decltype tests.
4745
+ //
4746
+ // I don't want to neednessly break compatibility with a
4747
+ // decently conforming C++20 compiler that works well for
4748
+ // everything else that Cpp2 needs from C++20. If the
4749
+ // 'requires' down here doesn't cause a problem, I'll keep
4750
+ // it here for now... if we do encounter a reason it needs to
4751
+ // also be on the declaration, move this code to (A).
4752
+ //
4753
+ // Handle requires clause - an explicit one the user wrote,
4754
+ // and/or any conditions we generated while processing the
4755
+ // parameters (i.e., forwarding a concrete type)
4748
4756
if (
4749
4757
n.requires_clause_expression
4750
4758
|| !function_requires_conditions.empty ()
@@ -4772,6 +4780,7 @@ class cppfront
4772
4780
function_requires_conditions = {};
4773
4781
printer.ignore_alignment ( false );
4774
4782
}
4783
+ // *** END NOTE =================================================
4775
4784
4776
4785
emit (
4777
4786
*n.initializer ,
0 commit comments