From 56ba9e3a52620f7afe41983f698a4d1d25d98d8a Mon Sep 17 00:00:00 2001 From: Luc des Trois Maisons Date: Tue, 21 Jul 2026 14:54:24 -0400 Subject: [PATCH] fix: add missing value_type to JSON iterators ValueConstIterator and ValueIterator lacked the value_type typedef required for std::iterator_traits deduction in C++20. GCC 13's STL correctly diagnoses this when the iterators are used with algorithms like std::all_of. Fixes build on GCC 13 without requiring GCC 15. --- include/xrpl/json/json_value.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/xrpl/json/json_value.h b/include/xrpl/json/json_value.h index 47ad3ac1e0..260917face 100644 --- a/include/xrpl/json/json_value.h +++ b/include/xrpl/json/json_value.h @@ -623,6 +623,7 @@ class ValueConstIterator : public ValueIteratorBase public: using size_t = unsigned int; using difference_type = int; + using value_type = Value const; using reference = Value const&; using pointer = Value const*; using SelfType = ValueConstIterator; @@ -687,6 +688,7 @@ class ValueIterator : public ValueIteratorBase public: using size_t = unsigned int; using difference_type = int; + using value_type = Value; using reference = Value&; using pointer = Value*; using SelfType = ValueIterator;