4#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_IS_POSSIBLE_UNIT_FOR_HPP_
5#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_IS_POSSIBLE_UNIT_FOR_HPP_
8#include "arene/base/stdlib_choice/enable_if.hpp"
9#include "arene/base/stdlib_choice/is_same.hpp"
17namespace units_detail {
22template <
typename Unit,
typename Kind,
typename = constra
ints<>>
23extern constexpr bool is_declared_possible_unit_for_v =
false;
29template <
typename Unit,
typename Kind>
30extern constexpr bool is_declared_possible_unit_for_v<
33 constraints<std::enable_if_t<std::is_same<Kind, typename Unit::unit_kind_type>::value>>> =
true;
36namespace is_possible_unit_for_detail {
42template <
typename Unit,
typename Kind,
typename = constra
ints<>>
43extern constexpr bool is_possible_unit_for_v =
false;
49template <
typename Unit,
typename Kind>
50extern constexpr bool is_possible_unit_for_v<
60template <
typename Unit,
typename Kind>
61extern constexpr bool is_possible_unit_for_v<
74template <
typename Unit,
typename Kind>
75extern constexpr bool is_possible_unit_for_v<
81 is_possible_unit_for_v<typename Unit::unit_kind_type, Kind>;
89template <
typename Unit,
typename Kind>
90extern constexpr bool is_possible_unit_for_v = is_possible_unit_for_detail::is_possible_unit_for_v<Unit, Kind>;
Definition accumulate.hpp:37
constexpr bool is_possible_unit_for_v
Type trait for detecting if a type is a unit for a specific quantity kind. Evaluates to true if Unit ...
constexpr bool is_quantity_kind_v
Type trait for detecting a quantity kind. Evaluates to true if the type is a quantity kind,...
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