Skip to content

Commit

Permalink
Replace boost::mpl with standard library
Browse files Browse the repository at this point in the history
  • Loading branch information
sweemer authored and lballabio committed May 9, 2023
1 parent 777d13c commit 346d720
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ql/timeseries.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <ql/functional.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator/reverse_iterator.hpp>
#include <boost/utility.hpp>
#include <algorithm>
#include <map>
#include <vector>
Expand Down Expand Up @@ -146,12 +145,10 @@ namespace QuantLib {

// The following typedef enables reverse iterators for
// bidirectional_iterator_tag category.
typedef typename boost::mpl::if_ <
boost::mpl::or_ <
std::is_same<iterator_category, std::bidirectional_iterator_tag>,
std::is_base_of<std::bidirectional_iterator_tag, iterator_category> >,
std::bidirectional_iterator_tag,
std::input_iterator_tag>::type enable_reverse;
typedef std::conditional_t<
std::is_same<iterator_category, std::bidirectional_iterator_tag>::value ||
std::is_base_of<std::bidirectional_iterator_tag, iterator_category>::value,
std::bidirectional_iterator_tag, std::input_iterator_tag> enable_reverse;

typedef typename
reverse<Container, enable_reverse>::const_reverse_iterator
Expand Down

0 comments on commit 346d720

Please sign in to comment.