summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-12 01:37:53 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-04-12 01:37:53 +0000
commit566f50ac91133ab989bf6d43c139c36582605ba1 (patch)
treec8d9f3b49931fb54728540b1bc7dc85046d04849
parent1eecac034d2f2764789978e970232d658a726cfa (diff)
parentc7158bc4b9f076faf306a7e47ce44036e4388032 (diff)
downloadunwinding-566f50ac91133ab989bf6d43c139c36582605ba1.tar.gz
Change-Id: I239c53f93c59976e0edbceefeec6c2f81ab164c4
-rw-r--r--libunwindstack/ElfInterfaceArm.h9
-rw-r--r--libunwindstack/include/unwindstack/DwarfSection.h9
2 files changed, 14 insertions, 4 deletions
diff --git a/libunwindstack/ElfInterfaceArm.h b/libunwindstack/ElfInterfaceArm.h
index 6ee6dc9..d8cad48 100644
--- a/libunwindstack/ElfInterfaceArm.h
+++ b/libunwindstack/ElfInterfaceArm.h
@@ -19,7 +19,6 @@
#include <elf.h>
#include <stdint.h>
-#include <iterator>
#include <unordered_map>
#include <unwindstack/ElfInterface.h>
@@ -32,8 +31,14 @@ class ElfInterfaceArm : public ElfInterface32 {
ElfInterfaceArm(Memory* memory) : ElfInterface32(memory) {}
virtual ~ElfInterfaceArm() = default;
- class iterator : public std::iterator<std::bidirectional_iterator_tag, uint32_t> {
+ class iterator {
public:
+ using iterator_category = std::bidirectional_iterator_tag;
+ using value_type = uint32_t;
+ using difference_type = std::ptrdiff_t;
+ using pointer = uint32_t*;
+ using reference = uint32_t&;
+
iterator(ElfInterfaceArm* interface, size_t index) : interface_(interface), index_(index) { }
iterator& operator++() { index_++; return *this; }
diff --git a/libunwindstack/include/unwindstack/DwarfSection.h b/libunwindstack/include/unwindstack/DwarfSection.h
index 33435b2..2318f2f 100644
--- a/libunwindstack/include/unwindstack/DwarfSection.h
+++ b/libunwindstack/include/unwindstack/DwarfSection.h
@@ -18,7 +18,6 @@
#include <stdint.h>
-#include <iterator>
#include <map>
#include <optional>
#include <unordered_map>
@@ -42,8 +41,14 @@ class DwarfSection {
DwarfSection(Memory* memory);
virtual ~DwarfSection() = default;
- class iterator : public std::iterator<std::bidirectional_iterator_tag, DwarfFde*> {
+ class iterator {
public:
+ using iterator_category = std::bidirectional_iterator_tag;
+ using value_type = DwarfFde*;
+ using difference_type = std::ptrdiff_t;
+ using pointer = DwarfFde**;
+ using reference = DwarfFde*&;
+
iterator(DwarfSection* section, size_t index) : index_(index) {
section->GetFdes(&fdes_);
if (index_ == static_cast<size_t>(-1)) {