@@ -4234,15 +4234,15 @@ auto autodiff(meta::type_declaration& t) -> void
42344234 auto additive_terms {CPP2_UFCS (get_terms)(CPP2_UFCS (get_term)(CPP2_UFCS (front)(cpp2::move (shift_terms))))};
42354235 if (cpp2::impl::cmp_greater (CPP2_UFCS (ssize)(additive_terms),1 ))
42364236 {
4237- auto first {true };
4237+ auto first {true };
42384238 for ( auto const & term : additive_terms ) {
42394239 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))};
42414241 line1 += " " + cpp2::to_string (op) + " " ;
42424242 line2 += " " + cpp2::to_string (cpp2::move (op)) + " " ;
42434243 }
42444244
4245- auto var {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(term))};
4245+ auto var {CPP2_UFCS (to_string)(CPP2_UFCS (get_term)(term))};
42464246 if (!(CPP2_UFCS (has_parameter_or_return_named)(mf, var))) {
42474247 CPP2_UFCS (error)(m, " temporary alpha limitation: the addition's left-hand side '" + cpp2::to_string (var) + " ' must be a parameter or return name" );
42484248 }
@@ -4267,22 +4267,22 @@ auto autodiff(meta::type_declaration& t) -> void
42674267 auto multiplicative_terms {CPP2_UFCS (get_terms)(CPP2_UFCS (get_term)(CPP2_UFCS (front)(cpp2::move (additive_terms))))};
42684268 if (cpp2::impl::cmp_greater (CPP2_UFCS (ssize)(multiplicative_terms),1 ))
42694269 {
4270- if (CPP2_UFCS (ssize)(multiplicative_terms) != 2 )
4270+ if (CPP2_UFCS (ssize)(multiplicative_terms) != 2 )
42714271 {
42724272 CPP2_UFCS (error)(m, " temporary alpha limitation: does not support chains of * and /" );
42734273 }
42744274
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 )))};
42764276 if (!(CPP2_UFCS (has_parameter_or_return_named)(mf, lhs))) {
42774277 CPP2_UFCS (error)(m, " temporary alpha limitation: the addition's left-hand side '" + cpp2::to_string (lhs) + " ' must be a parameter or return name" );
42784278 }
42794279
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 )))};
42814281 if (!(CPP2_UFCS (has_parameter_or_return_named)(mf, rhs))) {
42824282 CPP2_UFCS (error)(m, " temporary alpha limitation: the addition's right-hand side '" + cpp2::to_string (rhs) + " ' must be a parameter or return name" );
42834283 }
42844284
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 )))};
42864286 if (" *" == op) {
42874287 line1 += " " + cpp2::to_string (lhs) + " * " + cpp2::to_string (rhs) + " _d + " + cpp2::to_string (rhs) + " * " + cpp2::to_string (lhs) + " _d;" ;
42884288 line2 += " " + cpp2::to_string (cpp2::move (lhs)) + " * " + cpp2::to_string (cpp2::move (rhs)) + " ;" ;
0 commit comments