Procházet zdrojové kódy

meta: revert last commit, the intermediate class is actually useful for user customizations

skypjack před 1 týdnem
rodič
revize
17fc67de1f
1 změnil soubory, kde provedl 16 přidání a 4 odebrání
  1. 16 4
      src/entt/meta/container.hpp

+ 16 - 4
src/entt/meta/container.hpp

@@ -60,8 +60,7 @@ concept meta_associative_container_like = requires(Type value) {
  * @tparam Type Type of underlying sequence container.
  */
 template<cvref_unqualified Type>
-requires internal::meta_sequence_container_like<Type>
-struct meta_sequence_container_traits<Type> {
+struct basic_meta_sequence_container_traits {
     /*! @brief Unsigned integer type. */
     using size_type = meta_sequence_container::size_type;
     /*! @brief Meta iterator type. */
@@ -183,8 +182,7 @@ struct meta_sequence_container_traits<Type> {
  * @tparam Type Type of underlying associative container.
  */
 template<cvref_unqualified Type>
-requires internal::meta_associative_container_like<Type>
-struct meta_associative_container_traits<Type> {
+struct basic_meta_associative_container_traits {
     /*! @brief Unsigned integer type. */
     using size_type = meta_associative_container::size_type;
     /*! @brief Meta iterator type. */
@@ -281,6 +279,20 @@ struct meta_associative_container_traits<Type> {
     }
 };
 
+/**
+ * @brief Traits meta sequence container like types.
+ * @tparam Type Container type to inspect.
+ */
+template<internal::meta_sequence_container_like Type>
+struct meta_sequence_container_traits<Type>: basic_meta_sequence_container_traits<Type> {};
+
+/**
+ * @brief Traits for meta associative container like types.
+ * @tparam Type Container type to inspect.
+ */
+template<internal::meta_associative_container_like Type>
+struct meta_associative_container_traits<Type>: basic_meta_associative_container_traits<Type> {};
+
 } // namespace entt
 
 #endif