Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_instantiation_of.hpp
Go to the documentation of this file.
1// Copyright 2024, Toyota Motor Corporation
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_INSTANTIATION_OF_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_INSTANTIATION_OF_HPP_
7
8// IWYU pragma: private, include "arene/base/type_traits.hpp"
9// IWYU pragma: friend "(arene/base(?!/tests)|stdlib/include/stdlib_detail)/.*"
10namespace arene {
11namespace base {
12
13/// @c true iff @c Type is an instantiation of @c Template
14/// @note The default definition is always @c false. See specialization below.
15template <class Type, template <class...> class Template>
16constexpr bool is_instantiation_of_v = false;
17
18/// @c true iff @c Type is an instantiation of @c Template
19/// @note This specialization is always @c true.
20template <class... P, template <class...> class Template>
21constexpr bool is_instantiation_of_v<Template<P...>, Template> = true;
22
23} // namespace base
24} // namespace arene
25
26#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_INSTANTIATION_OF_HPP_
Definition array_exceptions_disabled.cpp:11
constexpr bool is_instantiation_of_v
Definition is_instantiation_of.hpp:16
constexpr bool is_instantiation_of_v< Template< P... >, Template >
Definition is_instantiation_of.hpp:21
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10