diff --git a/include/emp/base/array.hpp b/include/emp/base/array.hpp index 22916c195e..5a13341d6a 100644 --- a/include/emp/base/array.hpp +++ b/include/emp/base/array.hpp @@ -46,6 +46,13 @@ namespace emp { using this_t = array_iterator; using array_t = ARRAY_T; + // Iterator traits + using iterator_category = typename std::iterator_traits::iterator_category; + using value_type = typename std::iterator_traits::value_type; + using difference_type = typename std::iterator_traits::difference_type; + using pointer = typename std::iterator_traits::pointer; + using reference = typename std::iterator_traits::reference; + ITERATOR_T it; const array_t * arr_ptr { nullptr }; // Which array was iterator created from? diff --git a/include/emp/bits/Bits_Data.hpp b/include/emp/bits/Bits_Data.hpp index 83766d2acb..e8fe4a0a03 100644 --- a/include/emp/bits/Bits_Data.hpp +++ b/include/emp/bits/Bits_Data.hpp @@ -196,8 +196,8 @@ namespace emp { } } - [[nodiscard]] auto AsSpan() { return std::span(bits.data()); } - [[nodiscard]] auto AsSpan() const { return std::span(bits.data()); } + [[nodiscard]] auto AsSpan() { return std::span(bits.data(), MAX_FIELDS); } + [[nodiscard]] auto AsSpan() const { return std::span(bits.data(), MAX_FIELDS); } [[nodiscard]] bool OK() const { return true; } // Nothing to check yet.