All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Functions | Variables
util::quantities::concepts::details Namespace Reference

Classes

struct  category_of_type
 
struct  WithCategory
 An object belonging to a category Cat. More...
 
struct  has_category
 
struct  has_category< Obj, std::void_t< typename Obj::category_t > >
 
struct  category_has_name
 
struct  category_has_name< Cat, std::void_t< decltype(Cat::name())> >
 
struct  category_traits
 
struct  category_of_type< Cat, std::void_t< typename Cat::category_t > >
 
struct  invert_ratio
 
struct  ratio_simplifier
 
struct  has_unit
 Trait: true_type if U is a ScaledUnit-based object. More...
 
struct  is_quantity
 Trait: true_type if Q is a Quantity specialization. More...
 
struct  has_quantity
 Trait: true_type if Q is a Quantity-based object. More...
 
struct  quantity_value_type
 
struct  is_value_compatible_with
 
struct  has_value_compatible_with
 
class  numeric_limits
 Limits of a quantity are the same as the underlying type. More...
 
struct  invert_ratio< std::ratio< Num, Den > >
 
struct  ratio_simplifier< std::ratio< Num, Den > >
 
struct  has_unit_impl
 
struct  has_unit_impl< U, std::enable_if_t< util::always_true_v< typename U::unit_t > > >
 
struct  is_quantity< Quantity< Args...> >
 
struct  has_quantity_impl
 
struct  has_quantity_impl< Q, std::enable_if_t< util::always_true_v< typename Q::quantity_t > > >
 
struct  quantity_value_type_impl
 
struct  quantity_value_type_impl< T, std::enable_if_t<(has_unit_v< T > &&util::always_true_v< typename T::value_t >)> >
 

Typedefs

template<typename Cat >
using category_of = typename category_of_type< Cat >::type
 
template<typename R >
using invert_t = typename invert_ratio< R >::type
 
template<typename R >
using simplify_ratio = typename ratio_simplifier< R >::type
 
template<typename T >
using quantity_value_t = typename quantity_value_type< T >::type
 

Functions

template<typename Ratio , typename Value >
static constexpr auto applyRatioToValue (Value &&v)
 Applies the specified Ratio to the value in v. More...
 

Variables

template<typename Obj >
constexpr bool has_category_v = has_category<Obj>()
 
template<typename U >
constexpr bool has_unit_v = has_unit<U>()
 Trait: true if U is a ScaledUnit-based object. More...
 
template<typename Q >
constexpr bool is_quantity_v = is_quantity<Q>()
 Trait: true if Q is a Quantity specialization. More...
 
template<typename Q >
constexpr bool has_quantity_v = has_quantity<Q>()
 Trait: true if Q is a Quantity-based object. More...
 
template<typename T , typename Q >
constexpr bool is_value_compatible_with_v = is_value_compatible_with<T, Q>()
 Trait: true if the type T is compatible with the value of Q. More...
 
template<typename T , typename U >
constexpr bool has_value_compatible_with_v = has_value_compatible_with<T, U>()
 Trait: true if the value type of T is compatible with U's. More...
 

Typedef Documentation

template<typename Cat >
using util::quantities::concepts::details::category_of = typedef typename category_of_type<Cat>::type

Definition at line 36 of file intervals.h.

template<typename R >
using util::quantities::concepts::details::invert_t = typedef typename invert_ratio<R>::type

Definition at line 243 of file quantities.h.

template<typename T >
using util::quantities::concepts::details::quantity_value_t = typedef typename quantity_value_type<T>::type

Type of value of T: may be T or, for objects with units, T::value_t.

Definition at line 288 of file quantities.h.

template<typename R >
using util::quantities::concepts::details::simplify_ratio = typedef typename ratio_simplifier<R>::type

Definition at line 249 of file quantities.h.

Function Documentation

template<typename Ratio , typename Value >
static constexpr auto util::quantities::concepts::details::applyRatioToValue ( Value &&  v)
static

Applies the specified Ratio to the value in v.

Definition at line 236 of file quantities.h.

237  { return v * Ratio::num / Ratio::den; }

Variable Documentation

template<typename Obj >
constexpr bool util::quantities::concepts::details::has_category_v = has_category<Obj>()

Definition at line 1049 of file intervals.h.

template<typename Q >
constexpr bool util::quantities::concepts::details::has_quantity_v = has_quantity<Q>()

Trait: true if Q is a Quantity-based object.

Definition at line 276 of file quantities.h.

template<typename U >
constexpr bool util::quantities::concepts::details::has_unit_v = has_unit<U>()

Trait: true if U is a ScaledUnit-based object.

Definition at line 260 of file quantities.h.

template<typename T , typename U >
constexpr bool util::quantities::concepts::details::has_value_compatible_with_v = has_value_compatible_with<T, U>()

Trait: true if the value type of T is compatible with U's.

Definition at line 318 of file quantities.h.

template<typename Q >
constexpr bool util::quantities::concepts::details::is_quantity_v = is_quantity<Q>()

Trait: true if Q is a Quantity specialization.

Definition at line 268 of file quantities.h.

template<typename T , typename Q >
constexpr bool util::quantities::concepts::details::is_value_compatible_with_v = is_value_compatible_with<T, Q>()

Trait: true if the type T is compatible with the value of Q.

Definition at line 301 of file quantities.h.