Skip to content

Commit

Permalink
std::iterator is deprecated (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: mikee47 <mike@silyhouse.net>
  • Loading branch information
mikee47 and mikee47 authored Mar 25, 2024
1 parent d772ca9 commit c8f2489
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/include/Jerryscript/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -850,9 +850,15 @@ class Array : public Object
unsigned mIndex;
};

class Iterator : public std::iterator<std::random_access_iterator_tag, IndexedItem>
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)
Expand Down

0 comments on commit c8f2489

Please sign in to comment.