EnTT: src/entt/meta/pointer.hpp Source File

EnTT 3.15.0

Loading...
Searching...
No Matches
pointer.hpp
1// IWYU pragma: always_keep
2
3#ifndef ENTT_META_POINTER_HPP
4#define ENTT_META_POINTER_HPP
5
6#include <memory>
7#include <type_traits>
8#include "type_traits.hpp"
9
10namespace entt {
11
16template<typename Type>
17 struct is_meta_pointer_like<Type *>
18 : std::true_type {};
19
25template<typename Type, std::size_t N>
26// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
27 struct is_meta_pointer_like<Type (*)[N]>
28 : std::false_type {};
29
35template<typename Type>
36 struct is_meta_pointer_like<std::shared_ptr<Type>>
37 : std::true_type {};
38
45template<typename Type, typename... Args>
46 struct is_meta_pointer_like<std::unique_ptr<Type, Args...>>
47 : std::true_type {};
48
53template<typename Type>
54 struct is_meta_pointer_like<Type, std::void_t<typename Type::is_meta_pointer_like>>
55 : std::true_type {};
56
57} // namespace entt
58
59#endif
entt
EnTT default namespace.
Definition dense_map.hpp:22
entt::is_meta_pointer_like
Provides the member constant value to true if a given type is a pointer-like type from the point of v...
Definition type_traits.hpp:35