Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
has_explicit_units.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_EXPLICIT_UNITS_HPP_
5#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_HAS_EXPLICIT_UNITS_HPP_
6
7#include "arene/base/constraints/constraints.hpp"
8
9namespace arene {
10namespace base {
11namespace units_detail {
12
13/// @brief Implementation helper to detect if the type has the @c unit_type member
14/// @tparam Kind the type to check
15template <typename Kind, typename = constraints<>>
16extern constexpr bool has_explicit_units_v = false;
17
18/// @brief Implementation helper to detect if the type has the @c unit_type member
19/// @tparam Kind the type to check
20template <typename Kind>
21extern constexpr bool has_explicit_units_v<Kind, constraints<typename Kind::unit_type>> = true;
22
23} // namespace units_detail
24} // namespace base
25} // namespace arene
26
27#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_HAS_EXPLICIT_UNITS_HPP_
Definition array_exceptions_disabled.cpp:11
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10