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.
This commit is contained in:
Luc des Trois Maisons
2026-07-21 14:54:24 -04:00
parent 18e311e1e2
commit 56ba9e3a52

View File

@@ -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;