Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_referenceable.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_REFERENCEABLE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_REFERENCEABLE_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/is_object.hpp"
15#include "stdlib/include/stdlib_detail/is_reference.hpp"
16
17namespace std {
18namespace internal {
19
20/// @brief Internal type trait to check if a type is a function type without a cv-qualifier or ref-qualifier.
21/// @tparam Type The type to check
22template <typename Type>
23extern constexpr bool is_function_type_without_cvref_v = false;
24
25/// @brief Internal type trait to check if a type is a function type without a cv-qualifier or ref-qualifier.
26/// @tparam Result The result of the function type
27/// @tparam Args The arguments of the function type
28template <typename Result, typename... Args>
29extern constexpr bool is_function_type_without_cvref_v<Result(Args...)> = true;
30
31/// @brief Internal type trait to check if a type is a referenceable type
32/// @tparam Type The type to check
33template <typename Type>
34extern constexpr bool is_referenceable_v =
36} // namespace internal
37} // namespace std
38
39#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_REFERENCEABLE_HPP_
Definition internal_named_requirements.hpp:19
constexpr bool is_function_type_without_cvref_v< Result(Args...)>
Internal type trait to check if a type is a function type without a cv-qualifier or ref-qualifier.
constexpr bool is_referenceable_v
Internal type trait to check if a type is a referenceable type.
constexpr bool is_function_type_without_cvref_v
Internal type trait to check if a type is a function type without a cv-qualifier or ref-qualifier.
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