Surface_mesh iterator should not return a reference

This commit is contained in:
Sébastien Loriot 2022-08-05 13:40:28 +02:00
parent 8f07ed3207
commit d95d834af1
1 changed files with 2 additions and 1 deletions

View File

@ -507,6 +507,7 @@ private: //------------------------------------------------------ iterator types
: public boost::iterator_facade< Index_iterator<Index_>, : public boost::iterator_facade< Index_iterator<Index_>,
Index_, Index_,
std::random_access_iterator_tag std::random_access_iterator_tag
Index_,
> >
{ {
typedef boost::iterator_facade< Index_iterator<Index_>, typedef boost::iterator_facade< Index_iterator<Index_>,
@ -590,7 +591,7 @@ private: //------------------------------------------------------ iterator types
return this->hnd_ == other.hnd_; return this->hnd_ == other.hnd_;
} }
Index_& dereference() const { return const_cast<Index_&>(hnd_); } Index_ dereference() const { return const_cast<Index_&>(hnd_); }
Index_ hnd_; Index_ hnd_;
const Surface_mesh* mesh_; const Surface_mesh* mesh_;