EnTT: src/entt/core/type_traits.hpp Source File

EnTT 3.16.0

Loading...
Searching...
No Matches
type_traits.hpp
1#ifndef ENTT_CORE_TYPE_TRAITS_HPP
2#define ENTT_CORE_TYPE_TRAITS_HPP
3
4#include <cstddef>
5#include <iterator>
6#include <tuple>
7#include <type_traits>
8#include <utility>
9#include "../config/config.h"
10#include "fwd.hpp"
11
12namespace entt {
13
18template<std::size_t N>
19 struct choice_t
20 // unfortunately, doxygen cannot parse such a construct
21 : choice_t<N - 1>
22{};
23
25template<>
26 struct choice_t<0> {};
27
32template<std::size_t N>
33 inline constexpr choice_t<N> choice{};
34
43template<typename Type>
44 struct type_identity {
46 using type = Type;
47};
48
53template<typename Type>
54 using type_identity_t = typename type_identity<Type>::type;
55
60template<typename Type, typename = void>
61 struct size_of: std::integral_constant<std::size_t, 0u> {};
62
64template<typename Type>
65 struct size_of<Type, std::void_t<decltype(sizeof(Type))>>
66 // NOLINTNEXTLINE(bugprone-sizeof-expression)
67 : std::integral_constant<std::size_t, sizeof(Type)> {};
68
73template<typename Type>
74 inline constexpr std::size_t size_of_v = size_of<Type>::value;
75
81template<typename Type, typename>
82 using unpack_as_type = Type;
83
89template<auto Value, typename>
90 inline constexpr auto unpack_as_value = Value;
91
96template<auto Value>
97 using integral_constant = std::integral_constant<decltype(Value), Value>;
98
103template<id_type Value>
104 using tag = integral_constant<Value>;
105
110template<typename... Type>
111 struct type_list {
113 using type = type_list;
115 static constexpr auto size = sizeof...(Type);
116};
117
119template<std::size_t, typename>
120 struct type_list_element;
121
128template<std::size_t Index, typename First, typename... Other>
129 struct type_list_element<Index, type_list<First, Other...>>
130 : type_list_element<Index - 1u, type_list<Other...>> {};
131
137template<typename First, typename... Other>
138 struct type_list_element<0u, type_list<First, Other...>> {
140 using type = First;
141};
142
148template<std::size_t Index, typename List>
149 using type_list_element_t = typename type_list_element<Index, List>::type;
150
152template<typename, typename>
153 struct type_list_index;
154
161template<typename Type, typename First, typename... Other>
162 struct type_list_index<Type, type_list<First, Other...>> {
164 using value_type = std::size_t;
166 static constexpr value_type value = 1u + type_list_index<Type, type_list<Other...>>::value;
167};
168
174template<typename Type, typename... Other>
175 struct type_list_index<Type, type_list<Type, Other...>> {
176 static_assert(type_list_index<Type, type_list<Other...>>::value == sizeof...(Other), "Non-unique type");
178 using value_type = std::size_t;
180 static constexpr value_type value = 0u;
181};
182
187template<typename Type>
188 struct type_list_index<Type, type_list<>> {
190 using value_type = std::size_t;
192 static constexpr value_type value = 0u;
193};
194
200template<typename Type, typename List>
201 inline constexpr std::size_t type_list_index_v = type_list_index<Type, List>::value;
202
209template<typename... Type, typename... Other>
210 constexpr type_list<Type..., Other...> operator+(type_list<Type...>, type_list<Other...>) {
211 return {};
212}
213
215template<typename...>
216 struct type_list_cat;
217
219template<>
220 struct type_list_cat<> {
222 using type = type_list<>;
223};
224
231template<typename... Type, typename... Other, typename... List>
232 struct type_list_cat<type_list<Type...>, type_list<Other...>, List...> {
234 using type = typename type_list_cat<type_list<Type..., Other...>, List...>::type;
235};
236
241template<typename... Type>
242 struct type_list_cat<type_list<Type...>> {
244 using type = type_list<Type...>;
245};
246
251template<typename... List>
252 using type_list_cat_t = typename type_list_cat<List...>::type;
253
255namespace internal {
256
257template<typename...>
258struct type_list_unique;
259
260template<typename First, typename... Other, typename... Type>
261struct type_list_unique<type_list<First, Other...>, Type...>
262 : std::conditional_t<(std::is_same_v<First, Type> || ...), type_list_unique<type_list<Other...>, Type...>, type_list_unique<type_list<Other...>, Type..., First>> {};
263
264template<typename... Type>
265struct type_list_unique<type_list<>, Type...> {
266 using type = type_list<Type...>;
267};
268
269} // namespace internal
271
276template<typename List>
277 struct type_list_unique {
279 using type = typename internal::type_list_unique<List>::type;
280};
281
286template<typename List>
287 using type_list_unique_t = typename type_list_unique<List>::type;
288
295template<typename List, typename Type>
296 struct type_list_contains;
297
303template<typename... Type, typename Other>
304 struct type_list_contains<type_list<Type...>, Other>
305 : std::bool_constant<(std::is_same_v<Type, Other> || ...)> {};
306
312template<typename List, typename Type>
313 inline constexpr bool type_list_contains_v = type_list_contains<List, Type>::value;
314
316template<typename...>
317 struct type_list_diff;
318
324template<typename... Type, typename... Other>
325 struct type_list_diff<type_list<Type...>, type_list<Other...>> {
327 using type = type_list_cat_t<std::conditional_t<type_list_contains_v<type_list<Other...>, Type>, type_list<>, type_list<Type>>...>;
328};
329
334template<typename... List>
335 using type_list_diff_t = typename type_list_diff<List...>::type;
336
338template<typename, template<typename...> class>
339 struct type_list_transform;
340
346template<typename... Type, template<typename...> class Op>
347 struct type_list_transform<type_list<Type...>, Op> {
349 // NOLINTNEXTLINE(modernize-type-traits)
350 using type = type_list<typename Op<Type>::type...>;
351};
352
358template<typename List, template<typename...> class Op>
359 using type_list_transform_t = typename type_list_transform<List, Op>::type;
360
365template<auto... Value>
366 struct value_list {
368 using type = value_list;
370 static constexpr auto size = sizeof...(Value);
371};
372
374template<std::size_t, typename>
375 struct value_list_element;
376
383template<std::size_t Index, auto Value, auto... Other>
384 struct value_list_element<Index, value_list<Value, Other...>>
385 : value_list_element<Index - 1u, value_list<Other...>> {};
386
392template<auto Value, auto... Other>
393 struct value_list_element<0u, value_list<Value, Other...>> {
395 using type = decltype(Value);
397 static constexpr auto value = Value;
398};
399
405template<std::size_t Index, typename List>
406 using value_list_element_t = typename value_list_element<Index, List>::type;
407
413template<std::size_t Index, typename List>
414 inline constexpr auto value_list_element_v = value_list_element<Index, List>::value;
415
417template<auto, typename>
418 struct value_list_index;
419
426template<auto Value, auto First, auto... Other>
427 struct value_list_index<Value, value_list<First, Other...>> {
429 using value_type = std::size_t;
431 static constexpr value_type value = 1u + value_list_index<Value, value_list<Other...>>::value;
432};
433
439template<auto Value, auto... Other>
440 struct value_list_index<Value, value_list<Value, Other...>> {
441 static_assert(value_list_index<Value, value_list<Other...>>::value == sizeof...(Other), "Non-unique type");
443 using value_type = std::size_t;
445 static constexpr value_type value = 0u;
446};
447
452template<auto Value>
453 struct value_list_index<Value, value_list<>> {
455 using value_type = std::size_t;
457 static constexpr value_type value = 0u;
458};
459
465template<auto Value, typename List>
466 inline constexpr std::size_t value_list_index_v = value_list_index<Value, List>::value;
467
474template<auto... Value, auto... Other>
475 constexpr value_list<Value..., Other...> operator+(value_list<Value...>, value_list<Other...>) {
476 return {};
477}
478
480template<typename...>
481 struct value_list_cat;
482
484template<>
485 struct value_list_cat<> {
487 using type = value_list<>;
488};
489
496template<auto... Value, auto... Other, typename... List>
497 struct value_list_cat<value_list<Value...>, value_list<Other...>, List...> {
499 using type = typename value_list_cat<value_list<Value..., Other...>, List...>::type;
500};
501
506template<auto... Value>
507 struct value_list_cat<value_list<Value...>> {
509 using type = value_list<Value...>;
510};
511
516template<typename... List>
517 using value_list_cat_t = typename value_list_cat<List...>::type;
518
520template<typename>
521 struct value_list_unique;
522
528template<auto Value, auto... Other>
529 struct value_list_unique<value_list<Value, Other...>> {
531 using type = std::conditional_t<
532 ((Value == Other) || ...),
533 typename value_list_unique<value_list<Other...>>::type,
534 value_list_cat_t<value_list<Value>, typename value_list_unique<value_list<Other...>>::type>>;
535};
536
538template<>
539 struct value_list_unique<value_list<>> {
541 using type = value_list<>;
542};
543
548template<typename Type>
549 using value_list_unique_t = typename value_list_unique<Type>::type;
550
557template<typename List, auto Value>
558 struct value_list_contains;
559
565template<auto... Value, auto Other>
566 struct value_list_contains<value_list<Value...>, Other>
567 : std::bool_constant<((Value == Other) || ...)> {};
568
574template<typename List, auto Value>
575 inline constexpr bool value_list_contains_v = value_list_contains<List, Value>::value;
576
578template<typename...>
579 struct value_list_diff;
580
586template<auto... Value, auto... Other>
587 struct value_list_diff<value_list<Value...>, value_list<Other...>> {
589 using type = value_list_cat_t<std::conditional_t<value_list_contains_v<value_list<Other...>, Value>, value_list<>, value_list<Value>>...>;
590};
591
596template<typename... List>
597 using value_list_diff_t = typename value_list_diff<List...>::type;
598
600template<typename, typename>
601 struct is_applicable: std::false_type {};
602
609template<typename Func, template<typename...> class Tuple, typename... Args>
610 struct is_applicable<Func, Tuple<Args...>>: std::is_invocable<Func, Args...> {};
611
618template<typename Func, template<typename...> class Tuple, typename... Args>
619 struct is_applicable<Func, const Tuple<Args...>>: std::is_invocable<Func, Args...> {};
620
626template<typename Func, typename Args>
627 inline constexpr bool is_applicable_v = is_applicable<Func, Args>::value;
628
630template<typename, typename, typename>
631 struct is_applicable_r: std::false_type {};
632
640template<typename Ret, typename Func, typename... Args>
641 struct is_applicable_r<Ret, Func, std::tuple<Args...>>: std::is_invocable_r<Ret, Func, Args...> {};
642
650template<typename Ret, typename Func, typename Args>
651 inline constexpr bool is_applicable_r_v = is_applicable_r<Ret, Func, Args>::value;
652
658template<typename Type, typename = void>
659 struct is_complete: std::false_type {};
660
662template<typename Type>
663 struct is_complete<Type, std::void_t<decltype(sizeof(Type))>>: std::true_type {};
664
669template<typename Type>
670 inline constexpr bool is_complete_v = is_complete<Type>::value;
671
677template<typename Type, typename = void>
678 struct is_iterator: std::false_type {};
679
681namespace internal {
682
683template<typename, typename = void>
684struct has_iterator_category: std::false_type {};
685
686template<typename Type>
687struct has_iterator_category<Type, std::void_t<typename std::iterator_traits<Type>::iterator_category>>: std::true_type {};
688
689} // namespace internal
691
693template<typename Type>
694 struct is_iterator<Type, std::enable_if_t<!std::is_void_v<std::remove_const_t<std::remove_pointer_t<Type>>>>>
695 : internal::has_iterator_category<Type> {};
696
701template<typename Type>
702 inline constexpr bool is_iterator_v = is_iterator<Type>::value;
703
709template<typename Type>
710 struct is_ebco_eligible
711 : std::bool_constant<std::is_empty_v<Type> && !std::is_final_v<Type>> {};
712
717template<typename Type>
718 inline constexpr bool is_ebco_eligible_v = is_ebco_eligible<Type>::value;
719
725template<typename Type, typename = void>
726 struct is_transparent: std::false_type {};
727
729template<typename Type>
730 struct is_transparent<Type, std::void_t<typename Type::is_transparent>>: std::true_type {};
731
736template<typename Type>
737 inline constexpr bool is_transparent_v = is_transparent<Type>::value;
738
740namespace internal {
741
742template<typename, typename = void>
743struct has_tuple_size_value: std::false_type {};
744
745template<typename Type>
746struct has_tuple_size_value<Type, std::void_t<decltype(std::tuple_size<const Type>::value)>>: std::true_type {};
747
748template<typename, typename = void>
749struct has_value_type: std::false_type {};
750
751template<typename Type>
752struct has_value_type<Type, std::void_t<typename Type::value_type>>: std::true_type {};
753
754template<typename>
755[[nodiscard]] constexpr bool dispatch_is_equality_comparable();
756
757template<typename Type, std::size_t... Index>
758[[nodiscard]] constexpr bool unpack_maybe_equality_comparable(std::index_sequence<Index...>) {
759 return (dispatch_is_equality_comparable<std::tuple_element_t<Index, Type>>() && ...);
760}
761
762template<typename>
763[[nodiscard]] constexpr bool maybe_equality_comparable(char) {
764 return false;
765}
766
767template<typename Type>
768[[nodiscard]] constexpr auto maybe_equality_comparable(int) -> decltype(std::declval<Type>() == std::declval<Type>()) {
769 return true;
770}
771
772template<typename Type>
773[[nodiscard]] constexpr bool dispatch_is_equality_comparable() {
774 // NOLINTBEGIN(modernize-use-transparent-functors)
775 if constexpr(std::is_array_v<Type>) {
776 return false;
777 } else if constexpr(is_complete_v<std::tuple_size<std::remove_const_t<Type>>>) {
778 if constexpr(has_tuple_size_value<Type>::value) {
779 return maybe_equality_comparable<Type>(0) && unpack_maybe_equality_comparable<Type>(std::make_index_sequence<std::tuple_size<Type>::value>{});
780 } else {
781 return maybe_equality_comparable<Type>(0);
782 }
783 } else if constexpr(has_value_type<Type>::value) {
784 if constexpr(is_iterator_v<Type> || std::is_same_v<typename Type::value_type, Type> || dispatch_is_equality_comparable<typename Type::value_type>()) {
785 return maybe_equality_comparable<Type>(0);
786 } else {
787 return false;
788 }
789 } else {
790 return maybe_equality_comparable<Type>(0);
791 }
792 // NOLINTEND(modernize-use-transparent-functors)
793}
794
795} // namespace internal
797
803template<typename Type>
804 struct is_equality_comparable: std::bool_constant<internal::dispatch_is_equality_comparable<Type>()> {};
805
807template<typename Type>
808 struct is_equality_comparable<const Type>: is_equality_comparable<Type> {};
809
814template<typename Type>
815 inline constexpr bool is_equality_comparable_v = is_equality_comparable<Type>::value;
816
822template<typename To, typename From>
823 struct constness_as {
825 using type = std::remove_const_t<To>;
826};
827
829template<typename To, typename From>
830 struct constness_as<To, const From> {
832 using type = const To;
833};
834
840template<typename To, typename From>
841 using constness_as_t = typename constness_as<To, From>::type;
842
847template<typename Member>
848 class member_class {
849 static_assert(std::is_member_pointer_v<Member>, "Invalid pointer type to non-static member object or function");
850
851 template<typename Class, typename Ret, typename... Args>
852 static Class *clazz(Ret (Class::*)(Args...));
853
854 template<typename Class, typename Ret, typename... Args>
855 static Class *clazz(Ret (Class::*)(Args...) const);
856
857 template<typename Class, typename Type>
858 static Class *clazz(Type Class::*);
859
860public:
862 using type = std::remove_pointer_t<decltype(clazz(std::declval<Member>()))>;
863};
864
869template<typename Member>
870 using member_class_t = typename member_class<Member>::type;
871
877template<std::size_t Index, typename Candidate>
878 class nth_argument {
879 template<typename Ret, typename... Args>
880 static constexpr type_list<Args...> pick_up(Ret (*)(Args...));
881
882 template<typename Ret, typename Class, typename... Args>
883 static constexpr type_list<Args...> pick_up(Ret (Class ::*)(Args...));
884
885 template<typename Ret, typename Class, typename... Args>
886 static constexpr type_list<Args...> pick_up(Ret (Class ::*)(Args...) const);
887
888 template<typename Type, typename Class>
889 static constexpr type_list<Type> pick_up(Type Class ::*);
890
891 template<typename Type>
892 static constexpr decltype(pick_up(&Type::operator())) pick_up(Type &&);
893
894public:
896 using type = type_list_element_t<Index, decltype(pick_up(std::declval<Candidate>()))>;
897};
898
904template<std::size_t Index, typename Candidate>
905 using nth_argument_t = typename nth_argument<Index, Candidate>::type;
906
907} // namespace entt
908
909template<typename... Type>
910 struct std::tuple_size<entt::type_list<Type...>>: std::integral_constant<std::size_t, entt::type_list<Type...>::size> {};
911
912template<std::size_t Index, typename... Type>
913 struct std::tuple_element<Index, entt::type_list<Type...>>: entt::type_list_element<Index, entt::type_list<Type...>> {};
914
915template<auto... Value>
916 struct std::tuple_size<entt::value_list<Value...>>: std::integral_constant<std::size_t, entt::value_list<Value...>::size> {};
917
918template<std::size_t Index, auto... Value>
919 struct std::tuple_element<Index, entt::value_list<Value...>>: entt::value_list_element<Index, entt::value_list<Value...>> {};
920
921#endif
entt::member_class
Extracts the class of a non-static member object or function.
Definition type_traits.hpp:848
entt::member_class::type
std::remove_pointer_t< decltype(clazz(std::declval< Member >()))> type
The class of the given non-static member object or function.
Definition type_traits.hpp:862
entt::nth_argument
Extracts the n-th argument of a callable type.
Definition type_traits.hpp:878
entt::nth_argument::type
type_list_element_t< Index, decltype(pick_up(std::declval< Candidate >()))> type
N-th argument of the callable type.
Definition type_traits.hpp:896
entt
EnTT default namespace.
Definition dense_map.hpp:22
entt::member_class_t
typename member_class< Member >::type member_class_t
Helper type.
Definition type_traits.hpp:870
entt::is_equality_comparable_v
constexpr bool is_equality_comparable_v
Helper variable template.
Definition type_traits.hpp:815
entt::choice
constexpr choice_t< N > choice
Variable template for the choice trick.
Definition type_traits.hpp:33
entt::integral_constant
std::integral_constant< decltype(Value), Value > integral_constant
Wraps a static constant.
Definition type_traits.hpp:97
entt::constness_as_t
typename constness_as< To, From >::type constness_as_t
Alias template to facilitate the transcription of the constness.
Definition type_traits.hpp:841
entt::size_of_v
constexpr std::size_t size_of_v
Helper variable template.
Definition type_traits.hpp:74
entt::nth_argument_t
typename nth_argument< Index, Candidate >::type nth_argument_t
Helper type.
Definition type_traits.hpp:905
entt::type_list_cat_t
typename type_list_cat< List... >::type type_list_cat_t
Helper type.
Definition type_traits.hpp:252
entt::type_list_transform_t
typename type_list_transform< List, Op >::type type_list_transform_t
Helper type.
Definition type_traits.hpp:359
entt::value_list_unique_t
typename value_list_unique< Type >::type value_list_unique_t
Helper type.
Definition type_traits.hpp:549
entt::type_list_index_v
constexpr std::size_t type_list_index_v
Helper variable template.
Definition type_traits.hpp:201
entt::is_iterator_v
constexpr bool is_iterator_v
Helper variable template.
Definition type_traits.hpp:702
entt::value_list_cat_t
typename value_list_cat< List... >::type value_list_cat_t
Helper type.
Definition type_traits.hpp:517
entt::value_list_element_v
constexpr auto value_list_element_v
Helper type.
Definition type_traits.hpp:414
entt::type_list_diff_t
typename type_list_diff< List... >::type type_list_diff_t
Helper type.
Definition type_traits.hpp:335
entt::is_applicable_v
constexpr bool is_applicable_v
Helper variable template.
Definition type_traits.hpp:627
entt::is_transparent_v
constexpr bool is_transparent_v
Helper variable template.
Definition type_traits.hpp:737
entt::type_identity_t
typename type_identity< Type >::type type_identity_t
Helper type.
Definition type_traits.hpp:54
entt::is_complete_v
constexpr bool is_complete_v
Helper variable template.
Definition type_traits.hpp:670
entt::type_list_contains_v
constexpr bool type_list_contains_v
Helper variable template.
Definition type_traits.hpp:313
entt::type_list_element_t
typename type_list_element< Index, List >::type type_list_element_t
Helper type.
Definition type_traits.hpp:149
entt::value_list_index_v
constexpr std::size_t value_list_index_v
Helper variable template.
Definition type_traits.hpp:466
entt::type_list_unique_t
typename type_list_unique< List >::type type_list_unique_t
Helper type.
Definition type_traits.hpp:287
entt::operator+
constexpr type_list< Type..., Other... > operator+(type_list< Type... >, type_list< Other... >)
Concatenates multiple type lists.
Definition type_traits.hpp:210
entt::value_list_element_t
typename value_list_element< Index, List >::type value_list_element_t
Helper type.
Definition type_traits.hpp:406
entt::value_list_contains_v
constexpr bool value_list_contains_v
Helper variable template.
Definition type_traits.hpp:575
entt::value_list_diff_t
typename value_list_diff< List... >::type value_list_diff_t
Helper type.
Definition type_traits.hpp:597
entt::unpack_as_type
Type unpack_as_type
Using declaration to be used to repeat the same type a number of times equal to the size of a given p...
Definition type_traits.hpp:82
entt::tag
integral_constant< Value > tag
Alias template to facilitate the creation of named values.
Definition type_traits.hpp:104
entt::is_applicable_r_v
constexpr bool is_applicable_r_v
Helper variable template.
Definition type_traits.hpp:651
entt::unpack_as_value
constexpr auto unpack_as_value
Helper variable template to be used to repeat the same value a number of times equal to the size of a...
Definition type_traits.hpp:90
entt::is_ebco_eligible_v
constexpr bool is_ebco_eligible_v
Helper variable template.
Definition type_traits.hpp:718
entt::choice_t
Utility class to disambiguate overloaded functions.
Definition type_traits.hpp:22
entt::constness_as< To, const From >::type
const To type
The type resulting from the transcription of the constness.
Definition type_traits.hpp:832
entt::constness_as
Transcribes the constness of a type to another type.
Definition type_traits.hpp:823
entt::constness_as::type
std::remove_const_t< To > type
The type resulting from the transcription of the constness.
Definition type_traits.hpp:825
entt::is_applicable_r
Same as std::is_invocable_r, but with tuples for arguments.
Definition type_traits.hpp:631
entt::is_applicable
Same as std::is_invocable, but with tuples.
Definition type_traits.hpp:601
entt::is_complete
Provides the member constant value to true if a given type is complete, false otherwise.
Definition type_traits.hpp:659
entt::is_ebco_eligible
Provides the member constant value to true if a given type is both an empty and non-final class,...
Definition type_traits.hpp:711
entt::is_equality_comparable
Provides the member constant value to true if a given type is equality comparable,...
Definition type_traits.hpp:804
entt::is_iterator
Provides the member constant value to true if a given type is an iterator, false otherwise.
Definition type_traits.hpp:678
entt::is_transparent
Provides the member constant value to true if Type::is_transparent is valid and denotes a type,...
Definition type_traits.hpp:726
entt::size_of
A type-only sizeof wrapper that returns 0 where sizeof complains.
Definition type_traits.hpp:61
entt::type_identity
Identity type trait.
Definition type_traits.hpp:44
entt::type_identity::type
Type type
Identity type.
Definition type_traits.hpp:46
entt::type_list_cat< type_list< Type... >, type_list< Other... >, List... >::type
typename type_list_cat< type_list< Type..., Other... >, List... >::type type
A type list composed by the types of all the type lists.
Definition type_traits.hpp:234
entt::type_list_cat< type_list< Type... > >::type
type_list< Type... > type
A type list composed by the types of all the type lists.
Definition type_traits.hpp:244
entt::type_list_cat<>
Concatenates multiple type lists.
Definition type_traits.hpp:220
entt::type_list_cat<>::type
type_list<> type
A type list composed by the types of all the type lists.
Definition type_traits.hpp:222
entt::type_list_cat
Primary template isn't defined on purpose.
Definition type_traits.hpp:216
entt::type_list_contains
Provides the member constant value to true if a type list contains a given type, false otherwise.
Definition type_traits.hpp:296
entt::type_list_diff< type_list< Type... >, type_list< Other... > >::type
type_list_cat_t< std::conditional_t< type_list_contains_v< type_list< Other... >, Type >, type_list<>, type_list< Type > >... > type
A type list that is the difference between the two type lists.
Definition type_traits.hpp:327
entt::type_list_diff
Primary template isn't defined on purpose.
Definition type_traits.hpp:317
entt::type_list_element< 0u, type_list< First, Other... > >::type
First type
Searched type.
Definition type_traits.hpp:140
entt::type_list_element
Primary template isn't defined on purpose.
Definition type_traits.hpp:120
entt::type_list_index< Type, type_list< First, Other... > >::value_type
std::size_t value_type
Unsigned integer type.
Definition type_traits.hpp:164
entt::type_list_index< Type, type_list< First, Other... > >::value
static constexpr value_type value
Compile-time position of the given type in the sublist.
Definition type_traits.hpp:166
entt::type_list_index< Type, type_list< Type, Other... > >::value
static constexpr value_type value
Compile-time position of the given type in the sublist.
Definition type_traits.hpp:180
entt::type_list_index< Type, type_list< Type, Other... > >::value_type
std::size_t value_type
Unsigned integer type.
Definition type_traits.hpp:178
entt::type_list_index< Type, type_list<> >::value
static constexpr value_type value
Compile-time position of the given type in the sublist.
Definition type_traits.hpp:192
entt::type_list_index< Type, type_list<> >::value_type
std::size_t value_type
Unsigned integer type.
Definition type_traits.hpp:190
entt::type_list_index
Primary template isn't defined on purpose.
Definition type_traits.hpp:153
entt::type_list_transform< type_list< Type... >, Op >::type
type_list< typename Op< Type >::type... > type
Resulting type list after applying the transform function.
Definition type_traits.hpp:350
entt::type_list_transform
Primary template isn't defined on purpose.
Definition type_traits.hpp:339
entt::type_list_unique
Removes duplicates types from a type list.
Definition type_traits.hpp:277
entt::type_list_unique::type
typename internal::type_list_unique< List >::type type
A type list without duplicate types.
Definition type_traits.hpp:279
entt::type_list
A class to use to push around lists of types, nothing more.
Definition type_traits.hpp:111
entt::type_list<>::size
static constexpr auto size
Definition type_traits.hpp:115
entt::type_list::type
type_list type
Type list type.
Definition type_traits.hpp:113
entt::value_list_cat< value_list< Value... >, value_list< Other... >, List... >::type
typename value_list_cat< value_list< Value..., Other... >, List... >::type type
A value list composed by the values of all the value lists.
Definition type_traits.hpp:499
entt::value_list_cat< value_list< Value... > >::type
value_list< Value... > type
A value list composed by the values of all the value lists.
Definition type_traits.hpp:509
entt::value_list_cat<>
Concatenates multiple value lists.
Definition type_traits.hpp:485
entt::value_list_cat<>::type
value_list<> type
A value list composed by the values of all the value lists.
Definition type_traits.hpp:487
entt::value_list_cat
Primary template isn't defined on purpose.
Definition type_traits.hpp:481
entt::value_list_contains
Provides the member constant value to true if a value list contains a given value,...
Definition type_traits.hpp:558
entt::value_list_diff< value_list< Value... >, value_list< Other... > >::type
value_list_cat_t< std::conditional_t< value_list_contains_v< value_list< Other... >, Value >, value_list<>, value_list< Value > >... > type
A value list that is the difference between the two value lists.
Definition type_traits.hpp:589
entt::value_list_diff
Primary template isn't defined on purpose.
Definition type_traits.hpp:579
entt::value_list_element< 0u, value_list< Value, Other... > >::type
decltype(Value) type
Searched type.
Definition type_traits.hpp:395
entt::value_list_element< 0u, value_list< Value, Other... > >::value
static constexpr auto value
Searched value.
Definition type_traits.hpp:397
entt::value_list_element
Primary template isn't defined on purpose.
Definition type_traits.hpp:375
entt::value_list_index< Value, value_list< First, Other... > >::value
static constexpr value_type value
Compile-time position of the given value in the sublist.
Definition type_traits.hpp:431
entt::value_list_index< Value, value_list< First, Other... > >::value_type
std::size_t value_type
Unsigned integer type.
Definition type_traits.hpp:429
entt::value_list_index< Value, value_list< Value, Other... > >::value
static constexpr value_type value
Compile-time position of the given value in the sublist.
Definition type_traits.hpp:445
entt::value_list_index< Value, value_list< Value, Other... > >::value_type
std::size_t value_type
Unsigned integer type.
Definition type_traits.hpp:443
entt::value_list_index< Value, value_list<> >::value_type
std::size_t value_type
Unsigned integer type.
Definition type_traits.hpp:455
entt::value_list_index< Value, value_list<> >::value
static constexpr value_type value
Compile-time position of the given type in the sublist.
Definition type_traits.hpp:457
entt::value_list_index
Primary template isn't defined on purpose.
Definition type_traits.hpp:418
entt::value_list_unique< value_list< Value, Other... > >::type
std::conditional_t<((Value==Other)||...), typename value_list_unique< value_list< Other... > >::type, value_list_cat_t< value_list< Value >, typename value_list_unique< value_list< Other... > >::type > > type
A value list without duplicate types.
Definition type_traits.hpp:531
entt::value_list_unique< value_list<> >::type
value_list<> type
A value list without duplicate types.
Definition type_traits.hpp:541
entt::value_list_unique
Primary template isn't defined on purpose.
Definition type_traits.hpp:521
entt::value_list
A class to use to push around lists of constant values, nothing more.
Definition type_traits.hpp:366
entt::value_list<>::size
static constexpr auto size
Definition type_traits.hpp:370
entt::value_list::type
value_list type
Value list type.
Definition type_traits.hpp:368