Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_implicit.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
5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_IS_IMPLICIT_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_IS_IMPLICIT_HPP_
7
10
11namespace arene {
12namespace base {
13namespace units_detail {
14
15namespace is_implicit_detail {
16
17/// @brief helper used for detecting an implicit quantity kind
18/// @tparam Type the type to check
19template <typename Type, typename = constraints<>>
20extern constexpr bool provides_is_implicit_typedef_v = false;
21
22/// @brief helper used for detecting an implicit quantity kind
23/// @tparam Type the type to check.
24template <typename Type>
25extern constexpr bool provides_is_implicit_typedef_v<Type, constraints<typename Type::is_implicit>> = true;
26
27} // namespace is_implicit_detail
28
29/// @brief Type trait for detecting an implicit quantity kind.
30/// @tparam Type the type to check
31///
32/// Evaluates to @c true if the type is a quantity kind which provides an
33/// unspecified @c is_implicit type alias, @c false otherwise
34template <typename Type>
35extern constexpr bool is_implicit_v =
36 is_quantity_kind_v<Type> && is_implicit_detail::provides_is_implicit_typedef_v<Type>;
37
38} // namespace units_detail
39} // namespace base
40} // namespace arene
41
42#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UNITS_IS_IMPLICIT_HPP_
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,...
Definition accumulate.hpp:36