tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_pointer.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_POINTER_HPP
4#define TETL_TYPE_TRAITS_IS_POINTER_HPP
5
8
9namespace etl {
10
11namespace detail {
12template <typename T>
13struct is_pointer : etl::false_type { };
14
15template <typename T>
16struct is_pointer<T*> : etl::true_type { };
17} // namespace detail
18
26template <typename T>
27struct is_pointer : etl::detail::is_pointer<etl::remove_cv_t<T>> { };
28
29template <typename T>
30inline constexpr bool is_pointer_v = is_pointer<T>::value;
31
32} // namespace etl
33
34#endif // TETL_TYPE_TRAITS_IS_POINTER_HPP
Definition adjacent_find.hpp:8
constexpr bool is_pointer_v
Definition is_pointer.hpp:30
bool_constant< true > true_type
Definition bool_constant.hpp:13
bool_constant< false > false_type
Definition bool_constant.hpp:14
static constexpr bool value
Definition integral_constant.hpp:10
Checks whether T is a pointer to object or a pointer to function (but not a pointer to member/member ...
Definition is_pointer.hpp:27