Skip to content

Commit c8f2489

Browse files
mikee47mikee47
andauthored
std::iterator is deprecated (#18)
Co-authored-by: mikee47 <mike@silyhouse.net>
1 parent d772ca9 commit c8f2489

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/include/Jerryscript/Types.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,15 @@ class Array : public Object
850850
unsigned mIndex;
851851
};
852852

853-
class Iterator : public std::iterator<std::random_access_iterator_tag, IndexedItem>
853+
class Iterator
854854
{
855855
public:
856+
using iterator_category = std::random_access_iterator_tag;
857+
using value_type = IndexedItem;
858+
using difference_type = std::ptrdiff_t;
859+
using pointer = IndexedItem*;
860+
using reference = IndexedItem&;
861+
856862
Iterator(const Iterator&) = default;
857863

858864
Iterator(Array& array, unsigned index) : item(array, index)

0 commit comments

Comments
 (0)