Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_quantity_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_IS_QUANTITY_KIND_HPP_
5#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_IS_QUANTITY_KIND_HPP_
6
7#include "arene/base/constraints/constraints.hpp"
8#include "arene/base/stdlib_choice/enable_if.hpp"
9#include "arene/base/stdlib_choice/is_same.hpp"
10#include "arene/base/stdlib_choice/remove_cv.hpp"
11
12namespace arene {
13namespace base {
14
15namespace is_quantity_kind_detail {
16
17/// @brief Type trait for detecting a quantity kind
18/// @tparam Type the type to check
19template <typename Type, typename = constraints<>>
20extern constexpr bool is_quantity_kind_v = false;
21
22/// @brief Type trait for detecting a quantity kind
23/// @tparam Type the type to check.
24template <typename Type>
25extern constexpr bool is_quantity_kind_v<
26 Type,
27 constraints<std::enable_if_t<std::is_same<Type, typename Type::quantity_kind_type>::value>>> = true;
28
29} // namespace is_quantity_kind_detail
30
31/// @brief Type trait for detecting a quantity kind. Evaluates to @c true if the type is a quantity kind, @c false
32/// otherwise
33/// @tparam Type the type to check
34template <typename Type>
36
37} // namespace base
38} // namespace arene
39
40#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_IS_QUANTITY_KIND_HPP_
Definition array_exceptions_disabled.cpp:11
constexpr bool is_quantity_kind_v
Type trait for detecting a quantity kind. Evaluates to true if the type is a quantity kind,...
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10