Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_member_function_pointer.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_MEMBER_FUNCTION_POINTER_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_MEMBER_FUNCTION_POINTER_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#include "stdlib/include/stdlib_detail/is_function.hpp"
16#include "stdlib/include/stdlib_detail/remove_cv.hpp"
17
18namespace std {
19
21
22/// @brief Base case when @c T is not a member pointer
23/// @tparam T The type to check
24template <typename T>
25extern constexpr bool is_member_function_pointer_impl = false;
26
27/// @brief Case when @c T is a member pointer
28/// @tparam T The type to check
29template <typename T, typename U>
30extern constexpr bool is_member_function_pointer_impl<T U::*> = is_function_v<T>;
31
32} // namespace is_member_function_pointer_detail
33
34/// @brief Check if the supplied template argument is a member function pointer
35/// or not. The value is @c true if so, @c false otherwise
36/// @tparam T The type to check
37template <typename T>
38extern constexpr bool is_member_function_pointer_v =
40
41/// @brief Check if the supplied template argument is a member function pointer
42/// or not. The value is @c true if so, @c false otherwise
43/// @tparam T The type to check
44template <typename T>
46
47} // namespace std
48
49#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_MEMBER_FUNCTION_POINTER_HPP_
Check if the supplied template argument is a member function pointer or not. The value is true if so,...
Definition is_member_function_pointer.hpp:45
Definition is_member_function_pointer.hpp:20
constexpr bool is_member_function_pointer_impl< T U::* >
Case when T is a member pointer.
constexpr bool is_member_function_pointer_impl
Base case when T is not a member pointer.
constexpr bool is_member_function_pointer_v
Check if the supplied template argument is a member function pointer or not. The value is true if so,...
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