From 2a0cbb9f820d91f9d768cf43fcc0414eb62d06f3 Mon Sep 17 00:00:00 2001 From: Grigory Shabaganov Date: Sun, 29 Oct 2023 11:14:50 +1000 Subject: [PATCH] Remove std::iterator inheritance as the class is deprecated in C++17 and add required typedefs directly. --- entityx/Entity.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entityx/Entity.h b/entityx/Entity.h index 7c69e0a..966410d 100644 --- a/entityx/Entity.h +++ b/entityx/Entity.h @@ -367,8 +367,14 @@ class EntityManager : entityx::help::NonCopyable { /// An iterator over a view of the entities in an EntityManager. /// If All is true it will iterate over all valid entities and will ignore the entity mask. template - class ViewIterator : public std::iterator { + class ViewIterator { public: + typedef Entity::Id value_type; + typedef ptrdiff_t difference_type; + typedef Entity::Id* pointer; + typedef Entity::Id& reference; + typedef std::input_iterator_tag iterator_category; + Delegate &operator ++() { ++i_; next();