From 6d43ad2870b9411c409fcd12937e02eb44b2a76c Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sun, 4 May 2014 05:42:26 +0000 Subject: Add xpath_node_set::iterator that is the same as const_iterator. Exposing true mutable iterators allows the user to violate sorting order contract. However, some generic algorithms (i.e. Boost ForEach) require iterator methods to be present. git-svn-id: https://pugixml.googlecode.com/svn/trunk@998 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 6fb99be..c15e5a1 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -1212,6 +1212,9 @@ namespace pugi // Constant iterator type typedef const xpath_node* const_iterator; + + // We define non-constant iterator to be the same as constant iterator so that various generic algorithms (i.e. boost foreach) work + typedef const xpath_node* iterator; // Default constructor. Constructs empty set. xpath_node_set(); -- cgit v1.2.3