Explorar el Código

meta: constexpr all the way (see #883)

Michele Caini hace 3 años
padre
commit
96804b0b28
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. 1 0
      TODO
  2. 2 2
      src/entt/meta/meta.hpp

+ 1 - 0
TODO

@@ -11,6 +11,7 @@ DOC:
 * examples (and credits) from @alanjfs :)
 * examples (and credits) from @alanjfs :)
 
 
 WIP:
 WIP:
+* fix meta iterators, they copy handles in some cases O.o
 * add storage getter for filters to views and groups
 * add storage getter for filters to views and groups
 * remove storage::base_type, make views extract the sparse set directly
 * remove storage::base_type, make views extract the sparse set directly
 * make non-const registry::get use const assure or the like
 * make non-const registry::get use const assure or the like

+ 2 - 2
src/entt/meta/meta.hpp

@@ -1455,7 +1455,7 @@ public:
     using reference = value_type;
     using reference = value_type;
     using iterator_category = std::input_iterator_tag;
     using iterator_category = std::input_iterator_tag;
 
 
-    meta_iterator() ENTT_NOEXCEPT
+    constexpr meta_iterator() ENTT_NOEXCEPT
         : deref{},
         : deref{},
           offset{},
           offset{},
           handle{} {}
           handle{} {}
@@ -1545,7 +1545,7 @@ public:
     using reference = value_type;
     using reference = value_type;
     using iterator_category = std::input_iterator_tag;
     using iterator_category = std::input_iterator_tag;
 
 
-    meta_iterator() ENTT_NOEXCEPT
+    constexpr meta_iterator() ENTT_NOEXCEPT
         : vtable{},
         : vtable{},
           handle{} {}
           handle{} {}