From 55d8a338e362d3aa4448aa9bae776eb90ca1292a Mon Sep 17 00:00:00 2001 From: "James A. Kupsch" Date: Thu, 16 Feb 2023 10:11:59 -0600 Subject: [PATCH] warning fix: std::iterator is deprecated (#1394) - replace std::iterator with in class type aliass for required types --- symtabAPI/h/Symtab.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/symtabAPI/h/Symtab.h b/symtabAPI/h/Symtab.h index 7731c1572..bf6d8ab23 100644 --- a/symtabAPI/h/Symtab.h +++ b/symtabAPI/h/Symtab.h @@ -558,9 +558,15 @@ class SYMTAB_EXPORT Symtab : public LookupInterface, void erase(Symbol* s); // Iterator for the symbols. Do not use in parallel. - class iterator : public std::iterator { + class iterator { master_t::iterator m; public: + using iterator_category = std::forward_iterator_tag; + using value_type = Symbol*; + using difference_type = std::ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; + iterator(master_t::iterator i) : m(i) {} bool operator==(const iterator& x) { return m == x.m; } bool operator!=(const iterator& x) { return !operator==(x); } -- 2.21.0.windows.1