From a98326eb2954ac1e79f5eac28dbeab3ec15e047f Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Sat, 30 Jun 2018 12:43:08 +0200 Subject: 10.1 --- zenXml/zenxml/dom.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'zenXml/zenxml/dom.h') diff --git a/zenXml/zenxml/dom.h b/zenXml/zenxml/dom.h index 15700ee2..566af330 100755 --- a/zenXml/zenxml/dom.h +++ b/zenXml/zenxml/dom.h @@ -10,7 +10,6 @@ #include #include #include -#include #include "cvrt_text.h" //"readText/writeText" @@ -144,9 +143,15 @@ public: template < class IterTy, //underlying iterator type class T, //target object type class AccessPolicy > //access policy: see AccessPtrMap - class PtrIter : public std::iterator, private AccessPolicy //get rid of shared_ptr indirection + class PtrIter : private AccessPolicy //get rid of shared_ptr indirection { public: + using iterator_category = std::input_iterator_tag; + using value_type = T; + using difference_type = std::ptrdiff_t; + using pointer = T*; + using reference = T&; + PtrIter(IterTy it) : it_(it) {} PtrIter(const PtrIter& other) : it_(other.it_) {} PtrIter& operator++() { ++it_; return *this; } @@ -191,8 +196,8 @@ public: T& objectRef(const IterTy& it) const { return *it; } }; - using ChildIter = PtrIter::iterator, XmlElement, AccessListElement>; - using ChildIterConst = PtrIter::const_iterator, const XmlElement, AccessListElement>; + using ChildIter = PtrIter::iterator, XmlElement, AccessListElement>; + using ChildIterConst = PtrIter::const_iterator, const XmlElement, AccessListElement>; ///Access all child elements sequentially via STL iterators. /** @@ -257,7 +262,7 @@ private: std::list attributes_; //attributes in order of creation std::map::iterator> attributesSorted_; //alternate view: sorted by attribute name - FixedList childElements_; //child elements in order of creation + std::list childElements_; //child elements in order of creation std::multimap childElementsSorted_; //alternate view: sorted by element name XmlElement* parent_ = nullptr; }; -- cgit