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_
7#include "arene/base/constraints/constraints.hpp"
8#include "arene/base/stdlib_choice/enable_if.hpp"
9#include "arene/base/stdlib_choice/remove_cv.hpp"
10#include "arene/base/units/has_explicit_units.hpp"
11#include "arene/base/units/has_parent_kind.hpp"
12#include "arene/base/units/is_quantity_kind.hpp"
13#include "arene/base/units/is_unit.hpp"
18namespace selected_unit_for_detail {
22template <
typename Kind,
typename = constraints<>>
23struct selected_unit_for_impl;
28template <
typename Kind>
29struct selected_unit_for_impl<Kind, constraints<std::enable_if_t<is_unit_v<Kind>>>> {
37template <
typename Kind>
38struct selected_unit_for_impl<
41 std::enable_if_t<!is_unit_v<Kind>>,
42 std::enable_if_t<is_quantity_kind_v<Kind>>,
43 std::enable_if_t<units_detail::has_explicit_units_v<Kind>>>> {
45 using type =
typename Kind::unit_type;
51template <
typename Kind>
52struct selected_unit_for_impl<
55 std::enable_if_t<!is_unit_v<Kind>>,
56 std::enable_if_t<is_quantity_kind_v<Kind>>,
57 std::enable_if_t<!units_detail::has_explicit_units_v<Kind>>,
58 std::enable_if_t<units_detail::has_parent_kind_v<Kind>>>> {
60 using type =
typename selected_unit_for_impl<
typename Kind::parent_quantity_kind_type>::type;
68template <
typename Kind>
80template <
typename Kind>
Definition array_exceptions_disabled.cpp:11
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...
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10