Template Struct quantity_point

Struct Documentation

template<QuantitySpec U, Numeric Rep = f_t>
struct quantity_point

A quantity with a shifted value of zero (origin).

Template Parameters:
  • U – the quantity spec, specifying units, dimensions and magnitude

  • Rep – the underlying numeric representations (defaults to the standard floating point f_t)

Public Types

using spec = U
using rep = Rep
using data_t = std::conditional_t<is_unitless_v<U>, Rep, au::QuantityPoint<U, Rep>>

Public Functions

constexpr quantity_point() noexcept = default
inline constexpr quantity_point(const au::QuantityPoint<U, Rep> &q) noexcept
template<QuantitySpecOf<U> U2, Numeric Rep2>
inline constexpr quantity_point(const quantity_point<U2, Rep2> &q) noexcept
constexpr quantity_point(const quantity_point&) noexcept = default
inline constexpr quantity_point &operator=(const quantity_point &o) noexcept
template<QuantitySpecOf<U> U2, Numeric Rep2>
inline constexpr bool operator==(const quantity_point<U2, Rep2> &o) const noexcept
template<QuantitySpecOf<U> U2, Numeric Rep2>
inline constexpr bool operator!=(const quantity_point<U2, Rep2> &o) const noexcept
template<QuantitySpecOf<U> U2, Numeric Rep2>
inline constexpr bool operator>=(const quantity_point<U2, Rep2> &o) const noexcept
template<QuantitySpecOf<U> U2, Numeric Rep2>
inline constexpr bool operator<=(const quantity_point<U2, Rep2> &o) const noexcept
template<QuantitySpecOf<U> U2, Numeric Rep2>
inline constexpr bool operator>(const quantity_point<U2, Rep2> &o) const noexcept
template<QuantitySpecOf<U> U2, Numeric Rep2>
inline constexpr bool operator<(const quantity_point<U2, Rep2> &o) const noexcept
template<QuantitySpec U2, Numeric Rep2>
inline explicit constexpr operator quantity_point<U2, Rep2>() const noexcept

Public Members

data_t v

Public Static Attributes

static constexpr auto unit = wt::unit<spec>{}