Fix Windows iterator issue in Zip2Iterator and StructureOfArrays (#3322)

This commit is contained in:
Ben Doherty
2020-12-01 14:05:15 -08:00
committed by GitHub
parent f033799a43
commit 22d4e63787
2 changed files with 3 additions and 3 deletions

View File

@@ -181,7 +181,7 @@ public:
Iterator(Iterator const& rhs) noexcept = default;
Iterator& operator=(Iterator const& rhs) = default;
const reference operator*() const { return { soa, index }; }
reference operator*() const { return { soa, index }; }
reference operator*() { return { soa, index }; }
reference operator[](size_t n) { return *(*this + n); }

View File

@@ -60,8 +60,8 @@ public:
Zip2Iterator(Zip2Iterator const& rhs) noexcept = default;
Zip2Iterator& operator=(Zip2Iterator const& rhs) = default;
const value_type operator*() const { return { *mIt.first, *mIt.second }; }
reference operator*() { return { *mIt.first, *mIt.second }; }
value_type operator*() const { return { *mIt.first, *mIt.second }; }
reference operator*() { return { *mIt.first, *mIt.second }; }
const value_type operator[](size_t n) const { return *(*this + n); }
reference operator[](size_t n) { return *(*this + n); }