21 && std::is_arithmetic_v<ice::StrongNumericBase<T>>;
66 constexpr auto operator==(T left, T right)
noexcept ->
bool
68 return left.value == right.value;
74 return left.value <=> right.value;
77 template<
typename T>
requires StrongNumericType<T>
78 constexpr auto operator+(T left, T right)
noexcept -> T
80 return T{ left.value + right.value };
83 template<
typename T>
requires StrongNumericType<T>
84 constexpr auto operator-(T left, T right)
noexcept -> T
86 return T{ left.value - right.value };
89 template<
typename T>
requires StrongNumericType<T>
92 return T{ -left.value };
95 template<
typename T>
requires StrongNumericType<T>
96 constexpr auto operator*(T left, T right)
noexcept -> T
98 return T{ left.value * right.value };
101 template<
typename T>
requires StrongNumericType<T>
104 return T{ left.value * right };
107 template<
typename T>
requires StrongNumericType<T>
110 return T{ left.value / right.value };
113 template<
typename T>
requires StrongNumericType<T>
116 return T{ left.value / right };
119 template<
typename T>
requires StrongNumericType<T>
122 left.value += right.value;
126 template<
typename T>
requires StrongNumericType<T>
129 left.value -= right.value;
133 template<
typename T>
requires StrongNumericType<T>
136 left.value *= right.value;
140 template<
typename T>
requires StrongNumericType<T>
147 template<
typename T>
requires StrongNumericType<T>
150 left.value /= right.value;
154 template<
typename T>
requires StrongNumericType<T>
Concept used to determine if a struct is considerd a strong number wrapper.
Definition strong_type_integral.hxx:18
Definition strong_type_base.hxx:23
Definition strong_type_base.hxx:20
Definition strong_type_integral.hxx:25
Operator
Definition strong_type_integral.hxx:28
@ AddEq
Definition strong_type_integral.hxx:30
@ Add
Definition strong_type_integral.hxx:29
@ Mul
Definition strong_type_integral.hxx:29
@ Neg
Definition strong_type_integral.hxx:29
@ MulEq
Definition strong_type_integral.hxx:30
@ DivEq
Definition strong_type_integral.hxx:30
@ Div
Definition strong_type_integral.hxx:29
@ SubEq
Definition strong_type_integral.hxx:30
@ Sub
Definition strong_type_integral.hxx:29
SPDX-License-Identifier: MIT.
Definition array.hxx:12
constexpr auto operator<=>(ice::TimeType auto left, TimeType auto right) noexcept
Definition clock_types.hxx:135
constexpr auto operator-(ice::TimeType auto left, TimeType auto right) noexcept
Definition clock_types.hxx:151
constexpr auto operator==(ice::TimeType auto left, TimeType auto right) noexcept
Definition clock_types.hxx:159
constexpr auto operator*(T left, T right) noexcept -> T
Definition strong_type_integral.hxx:96
constexpr auto operator/(T left, T right) noexcept -> T
Definition strong_type_integral.hxx:108
constexpr auto operator-=(T &left, T right) noexcept -> T &
Definition strong_type_integral.hxx:127
constexpr auto operator+=(T &left, T right) noexcept -> T &
Definition strong_type_integral.hxx:120
typename ice::detail::ExtractMemberType< decltype(&T::value)>::Type StrongNumericBase
Definition strong_type_integral.hxx:14
constexpr auto operator/=(T &left, T right) noexcept -> T &
Definition strong_type_integral.hxx:148
constexpr auto operator*=(T &left, T right) noexcept -> T &
Definition strong_type_integral.hxx:134
constexpr auto operator+(ice::TimeType auto left, TimeType auto right) noexcept
Definition clock_types.hxx:143
Type tag to enable utility functions for strongly typed numeric values.
Definition strong_type_integral.hxx:11