Compare commits

...

1 Commits

Author SHA1 Message Date
Luc des Trois Maisons
56ba9e3a52 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.
2026-07-21 15:30:41 -04:00

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;