exclude is now a variable template

This commit is contained in:
Michele Caini
2019-01-30 23:50:38 +01:00
parent a5a6a58556
commit faceff620a
2 changed files with 3 additions and 3 deletions

View File

@@ -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{};
}

View File

@@ -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);