@@ -4234,15 +4234,15 @@ auto autodiff(meta::type_declaration& t) -> void
4234
4234
auto additive_terms {CPP2_UFCS (get_terms)(CPP2_UFCS (get_term)(CPP2_UFCS (front)(cpp2::move (shift_terms))))};
4235
4235
if (cpp2::impl::cmp_greater (CPP2_UFCS (ssize)(additive_terms),1 ))
4236
4236
{
4237
- auto first {true };
4237
+ auto first {true };
4238
4238
for ( auto const & term : additive_terms ) {
4239
4239
if (!(first)) {
4240
- auto op {CPP2_UFCS (to_string)(CPP2_UFCS (get_op)(term))};
4240
+ auto op {CPP2_UFCS (to_string)(CPP2_UFCS (get_op)(term))};
4241
4241
line1 += " " + cpp2::to_string (op) + " " ;
4242
4242
line2 += " " + cpp2::to_string (cpp2::move (op)) + " " ;
4243
4243
}
4244
4244
4245
- auto var {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(term))};
4245
+ auto var {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(term))};
4246
4246
if (!(CPP2_UFCS (has_parameter_or_return_named)(mf, var))) {
4247
4247
CPP2_UFCS (error)(m, " temporary alpha limitation: the addition's left-hand side '" + cpp2::to_string (var) + " ' must be a parameter or return name" );
4248
4248
}
@@ -4267,22 +4267,22 @@ auto autodiff(meta::type_declaration& t) -> void
4267
4267
auto multiplicative_terms {CPP2_UFCS (get_terms)(CPP2_UFCS (get_term)(CPP2_UFCS (front)(cpp2::move (additive_terms))))};
4268
4268
if (cpp2::impl::cmp_greater (CPP2_UFCS (ssize)(multiplicative_terms),1 ))
4269
4269
{
4270
- if (CPP2_UFCS (ssize)(multiplicative_terms) != 2 )
4270
+ if (CPP2_UFCS (ssize)(multiplicative_terms) != 2 )
4271
4271
{
4272
4272
CPP2_UFCS (error)(m, " temporary alpha limitation: does not support chains of * and /" );
4273
4273
}
4274
4274
4275
- auto lhs {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(CPP2_ASSERT_IN_BOUNDS_LITERAL (multiplicative_terms, 0 )))};
4275
+ auto lhs {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(CPP2_ASSERT_IN_BOUNDS_LITERAL (multiplicative_terms, 0 )))};
4276
4276
if (!(CPP2_UFCS (has_parameter_or_return_named)(mf, lhs))) {
4277
4277
CPP2_UFCS (error)(m, " temporary alpha limitation: the addition's left-hand side '" + cpp2::to_string (lhs) + " ' must be a parameter or return name" );
4278
4278
}
4279
4279
4280
- auto rhs {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(CPP2_ASSERT_IN_BOUNDS_LITERAL (multiplicative_terms, 1 )))};
4280
+ auto rhs {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(CPP2_ASSERT_IN_BOUNDS_LITERAL (multiplicative_terms, 1 )))};
4281
4281
if (!(CPP2_UFCS (has_parameter_or_return_named)(mf, rhs))) {
4282
4282
CPP2_UFCS (error)(m, " temporary alpha limitation: the addition's right-hand side '" + cpp2::to_string (rhs) + " ' must be a parameter or return name" );
4283
4283
}
4284
4284
4285
- auto op {CPP2_UFCS (to_string)(CPP2_UFCS (get_op)(CPP2_ASSERT_IN_BOUNDS_LITERAL (cpp2::move (multiplicative_terms), 1 )))};
4285
+ auto op {CPP2_UFCS (to_string)(CPP2_UFCS (get_op)(CPP2_ASSERT_IN_BOUNDS_LITERAL (cpp2::move (multiplicative_terms), 1 )))};
4286
4286
if (" *" == op) {
4287
4287
line1 += " " + cpp2::to_string (lhs) + " * " + cpp2::to_string (rhs) + " _d + " + cpp2::to_string (rhs) + " * " + cpp2::to_string (lhs) + " _d;" ;
4288
4288
line2 += " " + cpp2::to_string (cpp2::move (lhs)) + " * " + cpp2::to_string (cpp2::move (rhs)) + " ;" ;
0 commit comments