Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_array_convertible.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_ARRAY_CONVERTIBLE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_ARRAY_CONVERTIBLE_HPP_
7
8// IWYU pragma: private, include "arene/base/type_traits.hpp"
9// IWYU pragma: friend "(arene/base(?!/tests)|stdlib/include/stdlib_detail)/.*"
10
11#include "arene/base/stdlib_choice/integral_constant.hpp"
12#include "arene/base/stdlib_choice/is_convertible.hpp"
13
14namespace arene {
15namespace base {
16
17/// @brief Type trait to check if a pointer to an array of From is convertible to a
18/// pointer to an array of To
19template <typename From, typename To>
20constexpr bool is_array_convertible_v =
21 // NOLINTNEXTLINE(hicpp-avoid-c-arrays)
22 std::is_convertible<From (*)[], To (*)[]>::value;
23
24/// @brief Type trait to check if a pointer to an array of From is convertible to a
25/// pointer to an array of To
26template <typename From, typename To>
28
29} // namespace base
30} // namespace arene
31
32#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_IS_ARRAY_CONVERTIBLE_HPP_
Type trait to check if a pointer to an array of From is convertible to a pointer to an array of To.
Definition is_array_convertible.hpp:27
Definition array_exceptions_disabled.cpp:11
constexpr bool is_array_convertible_v
Type trait to check if a pointer to an array of From is convertible to a pointer to an array of To.
Definition is_array_convertible.hpp:20
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10