Skip to content

Commit c5f6b2f

Browse files
committed
It turns out we actually need a modifiable iterator
So that we can move members out of the collection...
1 parent a9bbbb8 commit c5f6b2f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/geom.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class multigeometry_t
166166
{
167167
public:
168168
using const_iterator = typename std::vector<GEOM>::const_iterator;
169-
using iterator = typename std::vector<GEOM>::const_iterator;
169+
using iterator = typename std::vector<GEOM>::iterator;
170170
using value_type = GEOM;
171171

172172
[[nodiscard]] std::size_t num_geometries() const noexcept
@@ -194,6 +194,8 @@ class multigeometry_t
194194
return a.m_geometry != b.m_geometry;
195195
}
196196

197+
iterator begin() noexcept { return m_geometry.begin(); }
198+
iterator end() noexcept { return m_geometry.end(); }
197199
const_iterator begin() const noexcept { return m_geometry.cbegin(); }
198200
const_iterator end() const noexcept { return m_geometry.cend(); }
199201
const_iterator cbegin() const noexcept { return m_geometry.cbegin(); }

0 commit comments

Comments
 (0)