4#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_SELECTED_UNIT_FOR_HPP_
5#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_SELECTED_UNIT_FOR_HPP_
8#include "arene/base/stdlib_choice/enable_if.hpp"
9#include "arene/base/stdlib_choice/remove_cv.hpp"
18namespace selected_unit_for_detail {
22template <
typename Kind,
typename = constra
ints<>>
23struct selected_unit_for_impl;
28template <
typename Kind>
37template <
typename Kind>
38struct selected_unit_for_impl<
45 using type =
typename Kind::unit_type;
51template <
typename Kind>
52struct selected_unit_for_impl<
60 using type =
typename selected_unit_for_impl<typename Kind::parent_quantity_kind_type>::type;
68template <
typename Kind>
69using selected_unit_for_t =
typename selected_unit_for_detail::selected_unit_for_impl<std::remove_cv_t<Kind>>::type;
74template <
typename Kind,
typename = arene::base::constra
ints<>>
80template <
typename Kind>
Definition accumulate.hpp:37
typename selected_unit_for_detail::selected_unit_for_impl< std::remove_cv_t< Kind > >::type selected_unit_for_t
Type trait for determining the unit for a quantity kind. If there is a unit for a given kind,...
Definition selected_unit_for.hpp:69
constexpr bool has_selected_unit_v
Type trait for determining if the given quantity kind has a unit selected. It is true if a unit is se...
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41