From a85712e8aae4172005b4ffecad4ce6e3a4394b61 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 11 Mar 2021 10:32:53 +0100 Subject: [PATCH] meta: * removed has_meta_sequence_container[_v] * removed has_meta_associative_container[_v] --- src/entt/meta/meta.hpp | 4 +-- src/entt/meta/node.hpp | 4 +-- src/entt/meta/type_traits.hpp | 50 +---------------------------------- 3 files changed, 5 insertions(+), 53 deletions(-) diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 6e0fb1e5b..f8949578a 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -183,13 +183,13 @@ class meta_any { break; case operation::SEQ: case operation::CSEQ: - if constexpr(has_meta_sequence_container_traits_v) { + if constexpr(is_complete_v>) { *static_cast(to) = { std::in_place_type, (op == operation::SEQ ? const_cast(from).as_ref() : from.as_ref()) }; } break; case operation::ASSOC: case operation::CASSOC: - if constexpr(has_meta_associative_container_traits_v) { + if constexpr(is_complete_v>) { *static_cast(to) = { std::in_place_type, (op == operation::ASSOC ? const_cast(from).as_ref() : from.as_ref()) }; } break; diff --git a/src/entt/meta/node.hpp b/src/entt/meta/node.hpp index 1902041d0..6a6712622 100644 --- a/src/entt/meta/node.hpp +++ b/src/entt/meta/node.hpp @@ -231,8 +231,8 @@ public: std::is_member_object_pointer_v, std::is_member_function_pointer_v, is_meta_pointer_like_v, - has_meta_sequence_container_traits_v, - has_meta_associative_container_traits_v, + is_complete_v>, + is_complete_v>, template_info(type_identity{}), std::rank_v, [](meta_type_node::size_type dim) ENTT_NOEXCEPT { return extent(dim, std::make_index_sequence>{}); }, diff --git a/src/entt/meta/type_traits.hpp b/src/entt/meta/type_traits.hpp index f2cb7e66f..89c4d942c 100644 --- a/src/entt/meta/type_traits.hpp +++ b/src/entt/meta/type_traits.hpp @@ -24,54 +24,6 @@ template struct meta_associative_container_traits; -/** - * @brief Provides the member constant `value` to true if support for meta - * sequence containers is enabled for the given type, false otherwise. - * @tparam Type Potentially sequence container type. - */ -template -struct has_meta_sequence_container_traits: std::false_type {}; - - -/*! @copydoc has_meta_sequence_container_traits */ -template -struct has_meta_sequence_container_traits::type::value_type>> - : std::true_type -{}; - - -/** - * @brief Helper variable template. - * @tparam Type Potentially sequence container type. - */ -template -inline constexpr auto has_meta_sequence_container_traits_v = has_meta_sequence_container_traits::value; - - -/** - * @brief Provides the member constant `value` to true if support for meta - * associative containers is enabled for the given type, false otherwise. - * @tparam Type Potentially associative container type. - */ -template -struct has_meta_associative_container_traits: std::false_type {}; - - -/*! @copydoc has_meta_associative_container_traits */ -template -struct has_meta_associative_container_traits::type::key_type>> - : std::true_type -{}; - - -/** - * @brief Helper variable template. - * @tparam Type Potentially associative container type. - */ -template -inline constexpr auto has_meta_associative_container_traits_v = has_meta_associative_container_traits::value; - - /** * @brief Provides the member constant `value` to true if a meta associative * container claims to wrap a key-only type, false otherwise. @@ -84,7 +36,7 @@ struct is_key_only_meta_associative_container: std::true_type {}; /*! @copydoc is_key_only_meta_associative_container */ template struct is_key_only_meta_associative_container::type::mapped_type>> - : std::false_type + : std::false_type {};