Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace boost::reverse_iterator with std::reverse_iterator #1676

Merged
merged 1 commit into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ql/math/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <ql/types.hpp>
#include <ql/errors.hpp>
#include <ql/utilities/null.hpp>
#include <boost/iterator/reverse_iterator.hpp>
#include <iterator>
#include <functional>
#include <algorithm>
#include <numeric>
Expand Down Expand Up @@ -122,8 +122,8 @@ namespace QuantLib {
typedef Real value_type;
typedef Real* iterator;
typedef const Real* const_iterator;
typedef boost::reverse_iterator<iterator> reverse_iterator;
typedef boost::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
//! \name Iterator access
//@{
const_iterator begin() const;
Expand Down
13 changes: 7 additions & 6 deletions ql/math/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <ql/math/array.hpp>
#include <ql/utilities/steppingiterator.hpp>
#include <initializer_list>
#include <iterator>

namespace QuantLib {

Expand Down Expand Up @@ -79,18 +80,18 @@ namespace QuantLib {

typedef Real* iterator;
typedef const Real* const_iterator;
typedef boost::reverse_iterator<iterator> reverse_iterator;
typedef boost::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef Real* row_iterator;
typedef const Real* const_row_iterator;
typedef boost::reverse_iterator<row_iterator> reverse_row_iterator;
typedef boost::reverse_iterator<const_row_iterator>
typedef std::reverse_iterator<row_iterator> reverse_row_iterator;
typedef std::reverse_iterator<const_row_iterator>
const_reverse_row_iterator;
typedef step_iterator<iterator> column_iterator;
typedef step_iterator<const_iterator> const_column_iterator;
typedef boost::reverse_iterator<column_iterator>
typedef std::reverse_iterator<column_iterator>
reverse_column_iterator;
typedef boost::reverse_iterator<const_column_iterator>
typedef std::reverse_iterator<const_column_iterator>
const_reverse_column_iterator;
//! \name Iterator access
//@{
Expand Down
4 changes: 2 additions & 2 deletions ql/timeseries.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <ql/errors.hpp>
#include <ql/functional.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator/reverse_iterator.hpp>
#include <iterator>
#include <algorithm>
#include <map>
#include <vector>
Expand Down Expand Up @@ -119,7 +119,7 @@ namespace QuantLib {
// containers.
template <class container, class iterator_category>
struct reverse {
typedef boost::reverse_iterator<typename container::const_iterator>
typedef std::reverse_iterator<typename container::const_iterator>
const_reverse_iterator;
reverse(const container& c) : c_(c) {}
const_reverse_iterator rbegin() const {
Expand Down