diff options
author | Moonchild <moonchild@palemoon.org> | 2023-11-08 12:33:50 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-08 12:33:50 +0000 |
commit | 7f99af410107ac25fd78c223dd2cbe5995f29656 (patch) | |
tree | 6f4ca78744cdeb3091338a3fd1fd1a71e1a5ce30 /js | |
parent | 7181c37a3985d14b791c233561f48a927bbc6463 (diff) | |
parent | e6f9b299513446b6b6b80d172db8e72772704ffa (diff) | |
download | uxp-7f99af410107ac25fd78c223dd2cbe5995f29656.tar.gz |
Merge pull request 'Switch our tree to building with c++17' (#2372) from 2281-c++17-buildwork into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2372
Diffstat (limited to 'js')
-rw-r--r-- | js/src/jsapi.h | 13 | ||||
-rw-r--r-- | js/src/vm/TypedArrayObject.cpp | 2 |
2 files changed, 11 insertions, 4 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) {} diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index de7ce028eb..e6144c0ac4 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -372,7 +372,7 @@ class TypedArrayObjectTemplate : public TypedArrayObject public: typedef NativeType ElementType; - static constexpr Scalar::Type ArrayTypeID() { return TypeIDOfType<NativeType>::id; } + static const Scalar::Type ArrayTypeID() { return TypeIDOfType<NativeType>::id; } static bool ArrayTypeIsUnsigned() { return TypeIsUnsigned<NativeType>(); } static bool ArrayTypeIsFloatingPoint() { return TypeIsFloatingPoint<NativeType>(); } |