Skip to content

Commit 5bfa640

Browse files
[Warnings] Removed Deprecated STD Iterator From Row Length Iter
1 parent 1a5380a commit 5bfa640

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libs/libvtrutil/src/vtr_ragged_matrix.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#ifndef VTR_RAGGED_MATRIX_H
22
#define VTR_RAGGED_MATRIX_H
3+
#include <cstddef>
34
#include <vector>
45
#include <iterator>
56

@@ -212,8 +213,14 @@ class FlatRaggedMatrix {
212213
* uses a callback to determine row lengths.
213214
*/
214215
template<class Callback>
215-
class RowLengthIterator : public std::iterator<std::random_access_iterator_tag, size_t> {
216+
class RowLengthIterator {
216217
public:
218+
using iterator_category = std::random_access_iterator_tag;
219+
using difference_type = std::ptrdiff_t;
220+
using value_type = size_t;
221+
using pointer = size_t*;
222+
using reference = size_t&;
223+
217224
RowLengthIterator(size_t irow, Callback& callback)
218225
: irow_(irow)
219226
, callback_(callback) {}

0 commit comments

Comments
 (0)