Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_base_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_STDLIB_INCLUDE_STDLIB_DETAIL_IS_BASE_OF_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_BASE_OF_HPP_
7
8// parasoft-begin-suppress CERT_CPP-DCL58-a-2 "Part of a standard library implementation"
9// parasoft-begin-suppress AUTOSAR-A17_6_1-a-2 "Part of a standard library implementation"
10
11// IWYU pragma: private, include <type_traits>
12// IWYU pragma: friend "stdlib_detail/.*"
13
14#include "stdlib/include/stdlib_detail/integral_constant.hpp"
15
16namespace std {
17
18/// @brief Type trait to detect if @c Base is a base class of @c Derived
19/// @tparam Base The type which may be a base class
20/// @tparam Derived The type which may be a derived class
21///
22template <typename Base, typename Derived>
23extern constexpr bool is_base_of_v = __is_base_of(Base, Derived);
24
25/// @brief Type trait to detect if @c Base is a base class of @c Derived
26/// @tparam Base The type which may be a base class
27/// @tparam Derived The type which may be a derived class
28///
29template <typename Base, typename Derived>
31
32} // namespace std
33
34#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_BASE_OF_HPP_
Type trait to detect if Base is a base class of Derived.
Definition is_base_of.hpp:30
constexpr bool is_base_of_v
Type trait to detect if Base is a base class of Derived.
constexpr auto operator()(::arene::base::result< void, E > const &value) const noexcept(noexcept(hash< E >{}(std::declval< E const & >()))) -> std::size_t
Calculate the hash of a result.
Definition result.hpp:1827