forked from boostorg/iterator
Fixes. Remove some Boost.MPL usages. Remove unused includes.
This commit is contained in:
committed by
Georgy Guminov
parent
01fd35e9f8
commit
b5df827151
@@ -14,11 +14,11 @@
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
#include <boost/iterator/iterator_categories.hpp>
|
||||
#include <boost/iterator/detail/facade_iterator_category.hpp>
|
||||
#include <boost/iterator/detail/type_traits/conjunction.hpp>
|
||||
#include <boost/iterator/detail/type_traits/negation.hpp>
|
||||
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
|
||||
#include <boost/mpl/always.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <type_traits>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/iterator/detail/type_traits/negation.hpp>
|
||||
#include <boost/iterator/detail/config_def.hpp> // this goes last
|
||||
|
||||
namespace boost {
|
||||
@@ -82,7 +83,7 @@ namespace iterators {
|
||||
>
|
||||
struct enable_if_interoperable_and_random_access_traversal :
|
||||
public std::enable_if<
|
||||
mpl::and_<
|
||||
detail::conjunction<
|
||||
is_interoperable< Facade1, Facade2 >
|
||||
, is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag >
|
||||
, is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag >
|
||||
@@ -278,7 +279,6 @@ namespace iterators {
|
||||
};
|
||||
|
||||
# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
template <class Reference, class Value>
|
||||
struct is_non_proxy_reference_impl
|
||||
{
|
||||
@@ -299,8 +299,9 @@ namespace iterators {
|
||||
|
||||
template <class Reference, class Value>
|
||||
struct is_non_proxy_reference
|
||||
: mpl::bool_<
|
||||
is_non_proxy_reference_impl<Reference, Value>::value
|
||||
: std::integral_constant<
|
||||
bool
|
||||
, is_non_proxy_reference_impl<Reference, Value>::value
|
||||
>
|
||||
{};
|
||||
# else
|
||||
@@ -332,7 +333,7 @@ namespace iterators {
|
||||
template <class Iterator, class Value, class Reference, class CategoryOrTraversal>
|
||||
struct postfix_increment_result
|
||||
: mpl::eval_if<
|
||||
mpl::and_<
|
||||
detail::conjunction<
|
||||
// A proxy is only needed for readable iterators
|
||||
std::is_convertible<
|
||||
Reference
|
||||
@@ -346,7 +347,7 @@ namespace iterators {
|
||||
|
||||
// No multipass iterator can have values that disappear
|
||||
// before positions can be re-visited
|
||||
, mpl::not_<
|
||||
, detail::negation<
|
||||
std::is_convertible<
|
||||
typename iterator_category_to_traversal<CategoryOrTraversal>::type
|
||||
, forward_traversal_tag
|
||||
@@ -430,8 +431,8 @@ namespace iterators {
|
||||
// proxy, or whether it can simply return a copy of the value_type.
|
||||
template <class ValueType, class Reference>
|
||||
struct use_operator_brackets_proxy
|
||||
: mpl::not_<
|
||||
mpl::and_<
|
||||
: detail::negation<
|
||||
detail::conjunction<
|
||||
// Really we want an is_copy_constructible trait here,
|
||||
// but is_POD will have to suffice in the meantime.
|
||||
std::is_standard_layout<ValueType>
|
||||
@@ -452,13 +453,13 @@ namespace iterators {
|
||||
};
|
||||
|
||||
template <class Iterator>
|
||||
operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, mpl::true_)
|
||||
operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, std::true_type)
|
||||
{
|
||||
return operator_brackets_proxy<Iterator>(iter);
|
||||
}
|
||||
|
||||
template <class Iterator>
|
||||
typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_)
|
||||
typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, std::false_type)
|
||||
{
|
||||
return *iter;
|
||||
}
|
||||
@@ -763,11 +764,11 @@ namespace iterators {
|
||||
typename boost::iterators::detail::operator_brackets_result<Derived, Value, reference>::type
|
||||
operator[](difference_type n) const
|
||||
{
|
||||
typedef boost::iterators::detail::use_operator_brackets_proxy<Value, Reference> use_proxy;
|
||||
const auto use_proxy = boost::iterators::detail::use_operator_brackets_proxy<Value, Reference>::value;
|
||||
|
||||
return boost::iterators::detail::make_operator_brackets_result<Derived>(
|
||||
this->derived() + n
|
||||
, use_proxy()
|
||||
, std::integral_constant<bool, use_proxy>{}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user