Skip to content

Remove deprecated std::iterator #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 30 additions & 8 deletions discregrid/include/Discregrid/mesh/entity_iterators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ namespace Discregrid
class TriangleMesh;

class FaceContainer;
class FaceIterator : public
std::iterator<std::random_access_iterator_tag, std::array<unsigned int, 3>>
class FaceIterator
{
public:
using iterator_category = std::random_access_iterator_tag;
using value_type = std::array<unsigned int, 3>;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;

typedef FaceIterator _Mytype;

Expand Down Expand Up @@ -65,11 +69,15 @@ class FaceIterator : public
unsigned int m_index;
TriangleMesh* m_mesh;
};
class FaceConstIterator : public
std::iterator<std::random_access_iterator_tag, std::array<unsigned int, 3> const>
class FaceConstIterator
{

public:
using iterator_category = std::random_access_iterator_tag;
using value_type = std::array<unsigned int, 3> const;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;

typedef FaceConstIterator _Mytype;

Expand Down Expand Up @@ -121,10 +129,15 @@ class FaceConstIterator : public
};

class IncidentFaceContainer;
class IncidentFaceIterator : public std::iterator<std::forward_iterator_tag, Halfedge>
class IncidentFaceIterator
{

public:
using iterator_category = std::forward_iterator_tag;
using value_type = Halfedge;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;

typedef IncidentFaceIterator _Mytype;

Expand Down Expand Up @@ -152,10 +165,15 @@ class IncidentFaceIterator : public std::iterator<std::forward_iterator_tag, Hal


class VertexContainer;
class VertexIterator : public std::iterator<std::random_access_iterator_tag, Eigen::Vector3d>
class VertexIterator
{

public:
using iterator_category = std::random_access_iterator_tag;
using value_type = Eigen::Vector3d;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;

typedef VertexIterator _Mytype;

Expand Down Expand Up @@ -207,11 +225,15 @@ class VertexIterator : public std::iterator<std::random_access_iterator_tag, Eig


class VertexConstContainer;
class VertexConstIterator :
public std::iterator<std::random_access_iterator_tag, Eigen::Vector3d const>
class VertexConstIterator
{

public:
using iterator_category = std::random_access_iterator_tag;
using value_type = Eigen::Vector3d const;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;

typedef VertexConstIterator _Mytype;

Expand Down