| 328 | |
| 329 | template<typename LHS, typename RHS> |
| 330 | static auto go(Operators::Opers t_oper, const Boxed_Value &t_lhs, const Boxed_Value &t_rhs) |
| 331 | -> typename std::enable_if<!std::is_floating_point<LHS>::value && !std::is_floating_point<RHS>::value, Boxed_Value>::type |
| 332 | { |
| 333 | typedef typename std::common_type<LHS, RHS>::type common_type; |
| 334 | if (t_oper > Operators::Opers::boolean_flag && t_oper < Operators::Opers::non_const_flag) |
| 335 | { |
| 336 | return boolean_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs)); |
| 337 | } else if (t_oper > Operators::Opers::non_const_flag && t_oper < Operators::Opers::non_const_int_flag && !t_lhs.is_const() && !t_lhs.is_return_value()) { |
| 338 | return binary_go(t_oper, *static_cast<LHS *>(t_lhs.get_ptr()), get_as_aux<common_type, RHS>(t_rhs), t_lhs); |
| 339 | } else if (t_oper > Operators::Opers::non_const_int_flag && t_oper < Operators::Opers::const_int_flag && !t_lhs.is_const() && !t_lhs.is_return_value()) { |
| 340 | return binary_int_go(t_oper, *static_cast<LHS *>(t_lhs.get_ptr()), get_as_aux<common_type, RHS>(t_rhs), t_lhs); |
| 341 | } else if (t_oper > Operators::Opers::const_int_flag && t_oper < Operators::Opers::const_flag) { |
| 342 | return const_binary_int_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs)); |
| 343 | } else if (t_oper > Operators::Opers::const_flag) { |
| 344 | return const_binary_go(t_oper, get_as_aux<common_type, LHS>(t_lhs), get_as_aux<common_type, RHS>(t_rhs)); |
| 345 | } else { |
| 346 | throw chaiscript::detail::exception::bad_any_cast(); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | template<typename LHS, typename RHS> |
| 351 | static auto go(Operators::Opers t_oper, const Boxed_Value &t_lhs, const Boxed_Value &t_rhs) |
nothing calls this directly
no test coverage detected