6#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_EXPLICIT_BASE_SET_HPP_
7#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_EXPLICIT_BASE_SET_HPP_
10#include "arene/base/stdlib_choice/cstddef.hpp"
11#include "arene/base/stdlib_choice/enable_if.hpp"
12#include "arene/base/stdlib_choice/remove_const.hpp"
13#include "arene/base/stdlib_choice/remove_cv.hpp"
29namespace combine_kinds_detail {
32template <
typename... BaseKinds>
33class combined_quantity_kind;
36namespace units_detail {
43template <
typename Kind>
44class explicit_base_barrier :
public quantity_kind<explicit_base_barrier<Kind>> {};
46namespace explicit_base_set_detail {
53template <
typename Kind>
57 "explicit base set cannot be determined for invalid quantity kind"
61 "internal error: a valid quantity kind was sorted to the explicit_base_set_error function by mistake"
70template <
typename Kind,
typename = constra
ints<>>
71extern constexpr auto explicit_base_set = explicit_base_set_error<Kind>();
77template <
typename Kind>
78extern constexpr auto explicit_base_set<Kind, constraints<std::enable_if_t<is_explicit_v<Kind>>>> =
79 base_kind_set<Kind>{base_kind_exponents{1U, 0U}};
87template <
typename Kind, exponent_t PositiveExponent, exponent_t NegativeExponent>
89 explicit_base_set<quantity_kind_with_exponent<Kind, PositiveExponent, NegativeExponent, constraints<>>> =
91 PositiveExponent * explicit_base_set<typename Kind::quantity_kind_type>,
92 -NegativeExponent* explicit_base_set<typename Kind::quantity_kind_type>
99template <
typename... BaseKinds>
100extern constexpr auto explicit_base_set<combine_kinds_detail::combined_quantity_kind<BaseKinds...>> =
101 set_union(explicit_base_set<BaseKinds>...);
108template <
typename BaseUnit,
typename Scale>
109extern constexpr auto explicit_base_set<scaled_unit_detail::scaled_unit_impl<BaseUnit, Scale>> =
110 explicit_base_set<BaseUnit>;
135template <
typename Kind>
136extern constexpr auto explicit_base_set = explicit_base_set_detail::explicit_base_set<std::remove_cv_t<Kind>>;
140template <
typename Kind>
Definition accumulate.hpp:37
constexpr bool is_quantity_kind_v
Type trait for detecting a quantity kind. Evaluates to true if the type is a quantity kind,...
typename quantity_kind_detail::choose_quantity_kind_base< Derived, std::remove_cv_t< ParentKindOrOriginOrUnit >, std::remove_cv_t< OriginOrUnit >, std::remove_cv_t< Unit > >::type quantity_kind
ParentKind class for declaring a quantity kind with a parent quantity kind.
Definition quantity_kind.hpp:327
constexpr bool always_false_v
A trait which always is false, as a type-dependent expression.
Definition always_false.hpp:25
Definition accumulate.hpp:36
typedef nullptr_t
The type of nullptr.
Definition cstddef.hpp:33
typename remove_const< Type >::type remove_const_t
remove const from the provided type. An alias for the modified type.
Definition remove_const.hpp:36