Преглед изворни кода

exclude is now a variable template

Michele Caini пре 7 година
родитељ
комит
faceff620a
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2 2
      src/entt/core/type_traits.hpp
  2. 1 1
      test/entt/entity/view.cpp

+ 2 - 2
src/entt/core/type_traits.hpp

@@ -35,11 +35,11 @@ constexpr auto type_list_cat(type_list<Type...>, type_list<Other...>, List...) {
 
 
 /**
- * @brief Alias template for type lists.
+ * @brief Variable template for exclusion lists.
  * @tparam Type List of types.
  */
 template<typename... Type>
-using exclude = type_list<Type...>;
+constexpr type_list<Type...> exclude{};
 
 
 }

+ 1 - 1
test/entt/entity/view.cpp

@@ -290,7 +290,7 @@ TEST(PersistentView, ExcludedComponents) {
     registry.assign<int>(e1, 1);
     registry.assign<char>(e1);
 
-    const auto view = registry.persistent_view<int>(entt::exclude<char>{});
+    const auto view = registry.persistent_view<int>(entt::exclude<char>);
 
     const auto e2 = registry.create();
     registry.assign<int>(e2, 2);