diff --git a/include/json/value.h b/include/json/value.h index 0c507a34d..62a323b08 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -946,7 +946,7 @@ class JSON_API ValueIteratorBase { bool operator!=(const SelfType& other) const { return !isEqual(other); } difference_type operator-(const SelfType& other) const { - return computeDistance(other); + return other.computeDistance(*this); } /// Return either the index or the member name of the referenced value as a