summaryrefslogtreecommitdiff
path: root/src/wasm-type.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2021-10-01 12:54:53 -0700
committerGitHub <noreply@github.com>2021-10-01 19:54:53 +0000
commit1a44da0fef430ff46c39cd56b0545089b9a573d1 (patch)
tree1a1c9b89a35c8a708a817fd41601aeba48774271 /src/wasm-type.h
parent65bcde2c30e82047a892332b95b114bc86f89614 (diff)
downloadbinaryen-1a44da0fef430ff46c39cd56b0545089b9a573d1.tar.gz
binaryen-1a44da0fef430ff46c39cd56b0545089b9a573d1.tar.bz2
binaryen-1a44da0fef430ff46c39cd56b0545089b9a573d1.zip
Remove use of std::iterator (#4199)
It's deprecated in C++17
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r--src/wasm-type.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h
index 48dbaf61b..542d26263 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -263,11 +263,14 @@ public:
std::string toString() const;
- struct Iterator : std::iterator<std::random_access_iterator_tag,
- Type,
- long,
- Type*,
- const Type&> {
+ struct Iterator {
+ // Iterator traits
+ using iterator_category = std::random_access_iterator_tag;
+ using value_type = Type;
+ using difference_type = long;
+ using pointer = const Type*;
+ using reference = const Type&;
+
const Type* parent;
size_t index;
Iterator(const Type* parent, size_t index) : parent(parent), index(index) {}