diff options
author | Moonchild <moonchild@palemoon.org> | 2023-10-13 23:07:22 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-05 13:15:08 +0100 |
commit | 73169b686304ed93a766f59536ff7042e0d06d39 (patch) | |
tree | 261dc45e050b8c5aef4a483edfce7cce75579568 /js | |
parent | 2132ea4a2257ced9894b956595019b4b04c19131 (diff) | |
download | uxp-73169b686304ed93a766f59536ff7042e0d06d39.tar.gz |
Issue #2281 - Replace std::iterator inheritance with iterator traits
definitions (as required by C++17).
Diffstat (limited to 'js')
-rw-r--r-- | js/src/jsapi.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 951b612502..19a0b805d2 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -5570,10 +5570,17 @@ class JS_PUBLIC_API(JSErrorNotes) // Create a deep copy of notes. js::UniquePtr<JSErrorNotes> copy(JSContext* cx); - class iterator : public std::iterator<std::input_iterator_tag, js::UniquePtr<Note>> - { + class iterator + {
+ private: js::UniquePtr<Note>* note_; - public: + public:
+ using iterator_category = std::input_iterator_tag;
+ using value_type = js::UniquePtr<Note>;
+ using difference_type = ptrdiff_t;
+ using pointer = value_type*;
+ using reference = value_type&;
+ explicit iterator(js::UniquePtr<Note>* note = nullptr) : note_(note) {} |