Skip to content

Commit 1ddcdd4

Browse files
committed
math: Fix C++17 std::iterator deprecation warning
GCC 15.2.1 In file included from image_io.cc:35: ../../libs/math/algo.h:145:38: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations] 145 | struct InterleavedIter : public std::iterator<std::input_iterator_tag, T> | ^~~~~~~~ In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_algobase.h:65, from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/algorithm:62, from image_io.cc:10: /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_iterator_base_types.h:129:34: note: declared here 129 | struct _GLIBCXX17_DEPRECATED iterator | ^~~~~~~~
1 parent 757afa1 commit 1ddcdd4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/math/algo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct predicate_epsilon_equal
142142

143143
/** Iterator that advances 'S' elements of type T. */
144144
template <typename T, int S>
145-
struct InterleavedIter : public std::iterator<std::input_iterator_tag, T>
145+
struct InterleavedIter
146146
{
147147
T const* pos;
148148
InterleavedIter (T const* pos) : pos(pos) {}

0 commit comments

Comments
 (0)