From 74cc74167c00bda153c212d37f8b01f139e6d181 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Sun, 24 Mar 2024 07:27:17 +0000 Subject: [PATCH] std::iterator is deprecated --- src/include/Jerryscript/Types.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/include/Jerryscript/Types.h b/src/include/Jerryscript/Types.h index dbd7afb..bff4e82 100644 --- a/src/include/Jerryscript/Types.h +++ b/src/include/Jerryscript/Types.h @@ -850,9 +850,15 @@ class Array : public Object unsigned mIndex; }; - class Iterator : public std::iterator + class Iterator { public: + using iterator_category = std::random_access_iterator_tag; + using value_type = IndexedItem; + using difference_type = std::ptrdiff_t; + using pointer = IndexedItem*; + using reference = IndexedItem&; + Iterator(const Iterator&) = default; Iterator(Array& array, unsigned index) : item(array, index)