Commit 160a9f92 authored by Patrick Thier's avatar Patrick Thier Committed by V8 LUCI CQ

Remove std::iterator uses

std: :iterator is deprecated C++17. Use base::iterator instead.
Change-Id: I682dc3b1547120e067a64eea4f71ffe4ee55ad16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289168
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77992}
parent b6253099
......@@ -5,7 +5,7 @@
#ifndef V8_COMPILER_FUNCTIONAL_LIST_H_
#define V8_COMPILER_FUNCTIONAL_LIST_H_
#include <iterator>
#include "src/base/iterator.h"
#include "src/zone/zone.h"
namespace v8 {
......@@ -100,7 +100,7 @@ class FunctionalList {
void Clear() { elements_ = nullptr; }
class iterator : public std::iterator<std::forward_iterator_tag, A> {
class iterator : public base::iterator<std::forward_iterator_tag, A> {
public:
explicit iterator(Cons* cur) : current_(cur) {}
......@@ -114,14 +114,6 @@ class FunctionalList {
}
bool operator!=(const iterator& other) const { return !(*this == other); }
// Implemented so that std::find and friends can use std::iterator_traits
// for this iterator type.
typedef std::forward_iterator_tag iterator_category;
typedef ptrdiff_t difference_type;
typedef A value_type;
typedef A* pointer;
typedef A& reference;
private:
Cons* current_;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment