From 08e41973f0f0041d77da775e5e899e4a7b3a45b8 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 15 Aug 2022 23:12:20 +0200 Subject: [PATCH] nvs_flash: update intrusive_list for compatibility with C++17 std::iterator is deprecated since C++17, the code produces a warning when compiled with clang and libc++. --- components/nvs_flash/src/intrusive_list.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/nvs_flash/src/intrusive_list.h b/components/nvs_flash/src/intrusive_list.h index 798b718a66..9a8c6f228e 100644 --- a/components/nvs_flash/src/intrusive_list.h +++ b/components/nvs_flash/src/intrusive_list.h @@ -30,9 +30,14 @@ class intrusive_list public: - class iterator : public std::iterator + class iterator { public: + using iterator_category = std::forward_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; iterator() : mPos(nullptr) {}