diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-05-04 05:42:26 +0000 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-05-04 05:42:26 +0000 |
commit | 6d43ad2870b9411c409fcd12937e02eb44b2a76c (patch) | |
tree | 856797beda61e2331bd48d18aa7fd6374b8ecf4b | |
parent | 9c5efaa074ed947325c64d8f22efd2b1b94e5f6d (diff) |
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
-rw-r--r-- | src/pugixml.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
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(); |