Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::quantity_unit< Tag, Kind > Class Template Reference

Base class for declaring a quantity unit. More...

Inheritance diagram for arene::base::quantity_unit< Tag, Kind >:
Inheritance graph

Public Types

using unit_kind_type = Kind
 Type alias to indicate the quantity kind for which this is a unit.
 

Friends

template<typename OtherDerived, typename OtherParentKind, typename OtherOrigin, typename OtherUnit, constraints< std::enable_if_t< is_possible_unit_for_v< Tag, OtherDerived > > > = nullptr>
auto rebind_quantity_kind_unit_type (quantity_kind_detail::quantity_kind_base< OtherDerived, OtherParentKind, OtherOrigin, OtherUnit > const &, Tag const &) -> quantity_unit_detail::quantity_kind_with_rebound_unit< OtherDerived, Tag >
 helper used to rebind the unit type of a quantity kind
 

Detailed Description

template<typename Tag, typename Kind>
class arene::base::quantity_unit< Tag, Kind >

Base class for declaring a quantity unit.

Template Parameters
Tagthe derived class which represents the quantity unit
KindThe quantity kind for which this is a unit
Precondition
Tag must derive from quantity_unit<Tag>

Member Typedef Documentation

◆ unit_kind_type

template<typename Tag, typename Kind>
using arene::base::quantity_unit< Tag, Kind >::unit_kind_type = Kind

Type alias to indicate the quantity kind for which this is a unit.

Friends And Related Symbol Documentation

◆ rebind_quantity_kind_unit_type

template<typename Tag, typename Kind>
template<typename OtherDerived, typename OtherParentKind, typename OtherOrigin, typename OtherUnit, constraints< std::enable_if_t< is_possible_unit_for_v< Tag, OtherDerived > > > = nullptr>
auto rebind_quantity_kind_unit_type ( quantity_kind_detail::quantity_kind_base< OtherDerived, OtherParentKind, OtherOrigin, OtherUnit > const & ,
Tag const &  ) -> quantity_unit_detail::quantity_kind_with_rebound_unit<OtherDerived, Tag>
friend

helper used to rebind the unit type of a quantity kind

Template Parameters
OtherDerivedderived quantity kind type to rebind
OtherParentKindparent kind of the quantity type to rebind
OtherUnitunit of the quantity type to rebind
Returns
different quantity kind with the unit specified to be Tag
Note
Requires is_possible_unit_for<Tag, OtherDerived> to be true

The documentation for this class was generated from the following file: