From 8bb83ae64dc1e7cc6bff4ccbfbd5b134db84ffff Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sun, 30 Jun 2024 16:10:35 +0200 Subject: [PATCH] view: get rid of a nasty trick on views --- src/entt/entity/view.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index 6784617a2..9bffee648 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -387,7 +387,8 @@ protected: * @tparam Exclude Types of storage used to filter the view. */ template -class basic_view, exclude_t>: public basic_common_view, sizeof...(Get), sizeof...(Exclude)> { +class basic_view, exclude_t, std::enable_if_t<(sizeof...(Get) + sizeof...(Exclude) > 1) || ((Get::storage_policy != deletion_policy::swap_and_pop) && ...)>> + : public basic_common_view, sizeof...(Get), sizeof...(Exclude)> { using base_type = basic_common_view, sizeof...(Get), sizeof...(Exclude)>; template @@ -768,7 +769,8 @@ private: * @tparam Get Type of storage iterated by the view. */ template -class basic_view, exclude_t<>, std::void_t::storage_policy == deletion_policy::swap_and_pop>>>: public basic_swap_and_pop_view { +class basic_view, exclude_t<>, std::enable_if_t> + : public basic_swap_and_pop_view { using base_type = basic_swap_and_pop_view; public: