tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_member_function_pointer.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP
4#define TETL_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP
5
6#include <etl/_config/all.hpp>
7
11
12namespace etl {
13
14#if defined(TETL_COMPILER_CLANG)
15
16template <typename T>
17inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(T);
18
19template <typename T>
20struct is_member_function_pointer : bool_constant<__is_member_function_pointer(T)> { };
21
22#else
23
24namespace detail {
25template <typename T>
26struct is_member_function_pointer_helper : etl::false_type { };
27
28template <typename T, typename U>
29struct is_member_function_pointer_helper<T U::*> : etl::is_function<T> { };
30
31} // namespace detail
32
36template <typename T>
37struct is_member_function_pointer : detail::is_member_function_pointer_helper<remove_cv_t<T> > { };
38
39template <typename T>
41
42#endif
43
44} // namespace etl
45
46#endif // TETL_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP
Definition adjacent_find.hpp:8
constexpr bool is_member_function_pointer_v
Definition is_member_function_pointer.hpp:40
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
bool_constant< false > false_type
Definition bool_constant.hpp:14
static constexpr bool value
Definition integral_constant.hpp:10
Checks whether T is a non-static member function pointer. Provides the member constant value which is...
Definition is_member_function_pointer.hpp:37