37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
|
From a42397e377cc2c26a6bb501ee131da63f0a33f45 Mon Sep 17 00:00:00 2001
|
||
|
From: Igor Ivanov <igori@nvidia.com>
|
||
|
Date: Mon, 31 Jan 2022 20:01:33 +0200
|
||
|
Subject: [PATCH] issue: 2945718 Fix gcc12 compilation issue
|
||
|
|
||
|
C++17 has deprecated a few components that had been in C++ since its beginning,
|
||
|
and std::iterator is one of them.
|
||
|
|
||
|
Signed-off-by: Igor Ivanov <igori@nvidia.com>
|
||
|
---
|
||
|
src/vma/util/vma_list.h | 7 ++++++-
|
||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/vma/util/vma_list.h b/src/vma/util/vma_list.h
|
||
|
index ae57fba4..9c9b6b38 100644
|
||
|
--- a/src/vma/util/vma_list.h
|
||
|
+++ b/src/vma/util/vma_list.h
|
||
|
@@ -88,9 +88,14 @@ public :
|
||
|
|
||
|
template<typename T, size_t offset(void)>
|
||
|
/* coverity[missing_move_assignment] */
|
||
|
-class list_iterator_t : public std::iterator<std::random_access_iterator_tag, T, std::ptrdiff_t, T*, T&>
|
||
|
+class list_iterator_t
|
||
|
{
|
||
|
public:
|
||
|
+ using iterator_category = std::random_access_iterator_tag;
|
||
|
+ using value_type = T;
|
||
|
+ using difference_type = std::ptrdiff_t;
|
||
|
+ using pointer = T*;
|
||
|
+ using reference = T&;
|
||
|
|
||
|
list_iterator_t(T* ptr = NULL) : m_ptr(ptr) {}
|
||
|
|
||
|
--
|
||
|
2.27.0
|
||
|
|