Procházet zdrojové kódy

view:
* fixed init list order to suppress a warning
* try to please gcc that fails to compile valid code

Michele Caini před 4 roky
rodič
revize
80d08d5a34
1 změnil soubory, kde provedl 5 přidání a 5 odebrání
  1. 5 5
      src/entt/entity/view.hpp

+ 5 - 5
src/entt/entity/view.hpp

@@ -28,7 +28,7 @@ namespace internal {
 
 
 template<typename View, std::size_t... Index>
 template<typename View, std::size_t... Index>
 auto storage_tuple(const View &view, std::index_sequence<Index...>) {
 auto storage_tuple(const View &view, std::index_sequence<Index...>) {
-    return std::forward_as_tuple(view.storage<Index>()...);
+    return std::forward_as_tuple(view.template storage<Index>()...);
 }
 }
 
 
 template<typename Storage>
 template<typename Storage>
@@ -707,16 +707,16 @@ public:
 
 
     /*! @brief Default constructor to use to create empty, invalid views. */
     /*! @brief Default constructor to use to create empty, invalid views. */
     basic_view() ENTT_NOEXCEPT
     basic_view() ENTT_NOEXCEPT
-        : view{},
-          filter{} {}
+        : filter{},
+          view{} {}
 
 
     /**
     /**
      * @brief Constructs a single-type view from a storage class.
      * @brief Constructs a single-type view from a storage class.
      * @param ref The storage for the type to iterate.
      * @param ref The storage for the type to iterate.
      */
      */
     basic_view(storage_type &ref) ENTT_NOEXCEPT
     basic_view(storage_type &ref) ENTT_NOEXCEPT
-        : view{&ref},
-          filter{} {}
+        : filter{},
+          view{&ref} {}
 
 
     /**
     /**
      * @brief Returns the leading storage of a view.
      * @brief Returns the leading storage of a view.