LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::quantities::concepts::details Namespace Reference

Classes

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

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 35 of file intervals.h.

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

Definition at line 244 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 250 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 235 of file quantities.h.

References den.

236  {
237  return v * Ratio::num / Ratio::den;
238  }
Float_t den
Definition: plot.C:35

Variable Documentation

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

Definition at line 1111 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 277 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 261 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 314 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 269 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 299 of file quantities.h.