|
| template<typename C> |
| Scalar_INTERNAL constexpr detail::scalar_unit_round_up_t< C > | swoc::round_up (C n) |
| |
| template<intmax_t N, typename C, typename T> |
| constexpr detail::scalar_round_up_t< N, C, T > | swoc::round_up (Scalar< N, C, T > v) |
| |
| template<typename C> |
| constexpr detail::scalar_unit_round_down_t< C > | swoc::round_down (C n) |
| |
| template<intmax_t N, typename C, typename T> |
| constexpr detail::scalar_round_down_t< N, C, T > | swoc::round_down (Scalar< N, C, T > v) |
| |
| template<intmax_t N, typename C1, intmax_t S, typename I, typename T> |
| bool | swoc::operator< (Scalar< N, C1, T > const &lhs, Scalar< S, I, T > const &rhs) |
| |
| template<intmax_t N, typename C1, intmax_t S, typename I, typename T> |
| bool | swoc::operator== (Scalar< N, C1, T > const &lhs, Scalar< S, I, T > const &rhs) |
| |
| template<intmax_t N, typename C1, intmax_t S, typename I, typename T> |
| bool | swoc::operator<= (Scalar< N, C1, T > const &lhs, Scalar< S, I, T > const &rhs) |
| |
| template<intmax_t N, typename C, intmax_t S, typename I, typename T> |
| bool | swoc::operator> (Scalar< N, C, T > const &lhs, Scalar< S, I, T > const &rhs) |
| |
| template<intmax_t N, typename C, intmax_t S, typename I, typename T> |
| bool | swoc::operator>= (Scalar< N, C, T > const &lhs, Scalar< S, I, T > const &rhs) |
| |
| template<intmax_t N, typename C, intmax_t S, typename I, typename T> |
| auto | swoc::operator+ (Scalar< N, C, T > lhs, Scalar< S, I, T > const &rhs) -> typename std::common_type< Scalar< N, C, T >, Scalar< S, I, T > >::type |
| |
| template<intmax_t N, typename C, typename T> |
| Scalar< N, C, T > | swoc::operator+ (Scalar< N, C, T > const &lhs, Scalar< N, C, T > const &rhs) |
| |
| template<intmax_t N, typename C, intmax_t S, typename I, typename T> |
| auto | swoc::operator- (Scalar< N, C, T > lhs, Scalar< S, I, T > const &rhs) -> typename std::common_type< Scalar< N, C, T >, Scalar< S, I, T > >::type |
| |
| template<intmax_t N, typename C, typename T> |
| Scalar< N, C, T > | swoc::operator- (Scalar< N, C, T > const &lhs, Scalar< N, C, T > const &rhs) |
| |
| template<intmax_t N, typename C, typename T> |
| Scalar< N, C, T > | swoc::operator* (Scalar< N, C, T > const &lhs, C n) |
| |
| template<intmax_t N, typename C, typename T> |
| Scalar< N, C, T > | swoc::operator* (C n, Scalar< N, C, T > const &rhs) |
| |
| template<intmax_t N, typename C, typename T> |
| Scalar< N, C, T > | swoc::operator* (Scalar< N, C, T > const &lhs, int n) |
| |
| template<intmax_t N, typename C, typename T> |
| Scalar< N, C, T > | swoc::operator* (int n, Scalar< N, C, T > const &rhs) |
| |
| template<intmax_t N> |
| Scalar< N, int > | swoc::operator* (Scalar< N, int > const &lhs, int n) |
| |
| template<intmax_t N> |
| Scalar< N, int > | swoc::operator* (int n, Scalar< N, int > const &rhs) |
| |
| template<intmax_t N, typename C, intmax_t S, typename I, typename T> |
| auto | swoc::operator/ (Scalar< N, C, T > lhs, Scalar< S, I, T > rhs) -> typename std::common_type< C, I >::type |
| |
| template<intmax_t N, typename C, typename T, typename I> |
| Scalar< N, C, T > | swoc::operator/ (Scalar< N, C, T > lhs, I n) |
| |
| template<intmax_t N, typename C> |
| C | swoc::round_up (C value) |
| |
| template<intmax_t N, typename C> |
| C | swoc::round_down (C value) |
| |
| template<typename T> |
| auto | swoc::detail::tag_label (std::ostream &, const meta::CaseTag< 0 > &) -> void |
| |
| template<typename T> |
| auto | swoc::detail::tag_label (std::ostream &w, const meta::CaseTag< 1 > &) -> decltype(T::label, meta::TypeFunc< void >()) |
| |
| template<typename T> |
| std::ostream & | swoc::detail::tag_label (std::ostream &w) |
| |
| template<intmax_t N, typename C, typename T> |
| ostream & | std::operator<< (ostream &s, swoc::Scalar< N, C, T > const &x) |
| |
Scaled integral values.
In many situations it is desirable to define scaling factors or base units (a "metric"). This template enables this to be done in a type and scaling safe manner where the defined factors carry their scaling information as part of the type.
Definition in file Scalar.h.