From fd0145345e2dcc68b3e825188626e707358f9f1d Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 29 Mar 2020 10:55:06 -0400 Subject: [PATCH] Fix Use of C++17 deprecated feature: std::iterator #2036 --- dlib/matrix/matrix_exp.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlib/matrix/matrix_exp.h b/dlib/matrix/matrix_exp.h index c0afb54c0..5c3ea59a3 100644 --- a/dlib/matrix/matrix_exp.h +++ b/dlib/matrix/matrix_exp.h @@ -57,7 +57,7 @@ namespace dlib template class matrix_exp; template - class matrix_exp_iterator : public std::iterator::type> + class matrix_exp_iterator { friend class matrix_exp; matrix_exp_iterator(const EXP& m_, long r_, long c_) @@ -72,9 +72,13 @@ namespace dlib matrix_exp_iterator() : r(0), c(0), nc(0), m(0) {} - typedef typename matrix_traits::type type; - typedef type value_type; - typedef typename matrix_traits::const_ret_type const_ret_type; + using type = typename matrix_traits::type; + using const_ret_type = typename matrix_traits::const_ret_type; + using iterator_category = std::forward_iterator_tag; + using value_type = type; + using difference_type = std::ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; bool operator == ( const matrix_exp_iterator& itr) const