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
// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4
#
ifndef
TETL_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP
5
#
define
TETL_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP
6
7
#
include
<
etl
/
_config
/
all
.
hpp
>
8
9
#
include
<
etl
/
_type_traits
/
bool_constant
.
hpp
>
10
#
include
<
etl
/
_type_traits
/
is_function
.
hpp
>
11
#
include
<
etl
/
_type_traits
/
remove_cv
.
hpp
>
12
13
namespace
etl
{
14
15
#
if
defined
(
TETL_COMPILER_CLANG
)
16
17
template
<
typename
T>
18
inline
constexpr
bool
is_member_function_pointer_v =
__is_member_function_pointer
(T);
19
20
template
<
typename
T>
21
struct
is_member_function_pointer : bool_constant<
__is_member_function_pointer
(T)> { };
22
23
#
else
24
25
namespace
detail
{
26
template
<
typename
T
>
27
struct
is_member_function_pointer_helper
:
etl
::
false_type
{ };
28
29
template
<
typename
T
,
typename
U
>
30
struct
is_member_function_pointer_helper
<
T
U
::*> :
etl
::
is_function
<
T
> { };
31
32
}
// namespace detail
33
34
/// \brief Checks whether T is a non-static member function pointer. Provides
35
/// the member constant value which is equal to true, if T is a non-static
36
/// member function pointer type. Otherwise, value is equal to false.
37
template
<
typename
T
>
38
struct
is_member_function_pointer
:
detail
::
is_member_function_pointer_helper
<
remove_cv_t
<
T
> > { };
39
40
template
<
typename
T
>
41
inline
constexpr
bool
is_member_function_pointer_v
=
is_member_function_pointer
<
T
>::
value
;
42
43
#
endif
44
45
}
// namespace etl
46
47
#
endif
// TETL_TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_HPP
etl
Definition
adjacent_find.hpp:9
include
etl
_type_traits
is_member_function_pointer.hpp
Generated on Sun Sep 7 2025 19:15:17 for tetl by
1.9.8