Просмотр исходного кода

meta: constexpr all the way (see #883)

Michele Caini 3 лет назад
Родитель
Сommit
96804b0b28
2 измененных файлов с 3 добавлено и 2 удалено
  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 :)
 
 WIP:
+* fix meta iterators, they copy handles in some cases O.o
 * add storage getter for filters to views and groups
 * remove storage::base_type, make views extract the sparse set directly
 * 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 iterator_category = std::input_iterator_tag;
 
-    meta_iterator() ENTT_NOEXCEPT
+    constexpr meta_iterator() ENTT_NOEXCEPT
         : deref{},
           offset{},
           handle{} {}
@@ -1545,7 +1545,7 @@ public:
     using reference = value_type;
     using iterator_category = std::input_iterator_tag;
 
-    meta_iterator() ENTT_NOEXCEPT
+    constexpr meta_iterator() ENTT_NOEXCEPT
         : vtable{},
           handle{} {}