Bug 1526245 - Replaced std::iterator inheritance with iterator traits definitions in JSErrorNotes (as required by C++17). r=Waldo
authorTheQwertiest <qwertiest@mail.ru>
Mon, 11 Feb 2019 15:39:04 +0300
changeset 464777 b9a53cec8555d13272107a0e17ff52d3a093131e
parent 464776 144dfd01fb48d8ae338391e0263d867998d4de3b
child 464778 a3d28922f30e7f2b4b906a3951c18f8d512f4626
push id35725
push userrgurzau@mozilla.com
push dateMon, 18 Mar 2019 21:38:44 +0000
treeherdermozilla-central@fe798624cda0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1526245
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1526245 - Replaced std::iterator inheritance with iterator traits definitions in JSErrorNotes (as required by C++17). r=Waldo
js/public/ErrorReport.h
--- a/js/public/ErrorReport.h
+++ b/js/public/ErrorReport.h
@@ -166,22 +166,27 @@ class JSErrorNotes {
                    JSErrorCallback errorCallback, void* userRef,
                    const unsigned errorNumber, ...);
 
   JS_PUBLIC_API size_t length();
 
   // Create a deep copy of notes.
   js::UniquePtr<JSErrorNotes> copy(JSContext* cx);
 
-  class iterator final
-      : public std::iterator<std::input_iterator_tag, js::UniquePtr<Note>> {
+  class iterator final {
    private:
     js::UniquePtr<Note>* note_;
 
    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) {}
 
     bool operator==(iterator other) const { return note_ == other.note_; }
     bool operator!=(iterator other) const { return !(*this == other); }
     iterator& operator++() {
       note_++;
       return *this;
     }