diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 4b2d72322..ed45136cf 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -255,6 +255,9 @@ class GenericMemberIterator { Iterator& operator+=(DifferenceType n) { ptr_+=n; return *this; } Iterator& operator-=(DifferenceType n) { ptr_-=n; return *this; } + + friend Iterator operator+(DifferenceType n, const Iterator& i) { return Iterator(n+i.ptr_); } + friend Iterator operator-(DifferenceType n, const Iterator& i) { return Iterator(n-i.ptr_); } //@} //! @name relations