Переглянути джерело

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++.
Ivan Grokhotkov 3 роки тому
батько
коміт
08e41973f0
1 змінених файлів з 6 додано та 1 видалено
  1. 6 1
      components/nvs_flash/src/intrusive_list.h

+ 6 - 1
components/nvs_flash/src/intrusive_list.h

@@ -30,9 +30,14 @@ class intrusive_list
 
 public:
 
-    class iterator : public std::iterator<std::forward_iterator_tag, T>
+    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) {}