7 #if !defined(CNL_IMPL_ROUNDING_FLOOR_ROUNDING_TAG_H)
8 #define CNL_IMPL_ROUNDING_FLOOR_ROUNDING_TAG_H
10 #include "../cmath/abs.h"
11 #include "../custom_operator/definition.h"
12 #include "../custom_operator/native_tag.h"
13 #include "is_rounding_tag.h"
16 #include <type_traits>
29 : _impl::homogeneous_deduction_tag_base
30 , _impl::homogeneous_operator_tag_base {
39 template<_impl::unary_arithmetic_op Operator,
typename Operand>
40 struct custom_operator<Operator, op_value<Operand, neg_inf_rounding_tag>>
41 : custom_operator<Operator, op_value<Operand, _impl::native_tag>> {
44 template<_impl::binary_arithmetic_op Operator,
typename Lhs,
typename Rhs>
45 struct custom_operator<Operator, op_value<Lhs, neg_inf_rounding_tag>, op_value<Rhs, neg_inf_rounding_tag>>
49 template<
typename Lhs,
typename Rhs>
50 struct custom_operator<_impl::divide_op, op_value<Lhs, neg_inf_rounding_tag>, op_value<Rhs, neg_inf_rounding_tag>> {
52 using result_type = decltype(std::declval<Lhs>() / std::declval<Rhs>());
53 [[nodiscard]] constexpr
auto remainder(Lhs
const& lhs, Rhs
const& rhs)
const -> result_type
57 [[nodiscard]] constexpr
auto division(Lhs
const& lhs, Rhs
const& rhs)
const -> result_type
61 [[nodiscard]] constexpr
auto division_neg(Lhs
const& lhs, Rhs
const& rhs)
const
68 [[nodiscard]] constexpr
auto operator()(Lhs
const& lhs, Rhs
const& rhs)
const -> result_type
71 ? division_neg(lhs, rhs)
76 template<_impl::shift_op Operator, tag RhsTag,
typename Lhs,
typename Rhs>
77 struct custom_operator<Operator, op_value<Lhs, neg_inf_rounding_tag>, op_value<Rhs, RhsTag>> : Operator {
80 template<_impl::prefix_op Operator,
typename Rhs>
81 struct custom_operator<Operator, op_value<Rhs, neg_inf_rounding_tag>> : Operator {
84 template<_impl::postfix_op Operator,
typename Lhs>
85 struct custom_operator<Operator, op_value<Lhs, neg_inf_rounding_tag>> : Operator {
89 #endif // CNL_IMPL_ROUNDING_FLOOR_ROUNDING_TAG_H