Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
has_parent_kind.hpp
Go to the documentation of this file.
1// Copyright 2026, Toyota Motor Corporation
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_HAS_PARENT_KIND_HPP_
5#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_HAS_PARENT_KIND_HPP_
6
7#include "arene/base/constraints/constraints.hpp"
8
9namespace arene {
10namespace base {
11
12namespace units_detail {
13/// @brief Type trait to check if a quantity kind has a parent kind. The value is @c true if it does, @c false otherwise
14/// @tparam Kind the quantity kind to check
15template <typename Kind, typename = constraints<>>
16extern constexpr bool has_parent_kind_v = false;
17
18/// @brief Type trait to check if a quantity kind has a parent kind. The value is @c true if it does, @c false otherwise
19/// @tparam Kind the quantity kind to check
20template <typename Kind>
21extern constexpr bool has_parent_kind_v<Kind, constraints<typename Kind::parent_quantity_kind_type>> = true;
22} // namespace units_detail
23
24} // namespace base
25} // namespace arene
26
27#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_HAS_PARENT_KIND_HPP_
Definition array_exceptions_disabled.cpp:11
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10