iterator_support

The contents of this module can be included with the header hpx/modules/iterator_support.hpp. These headers may be used by user-code but are not guaranteed stable (neither header location nor contents). You are using these at your own risk. If you wish to use non-public functionality from a module we strongly suggest only including the module header hpx/modules/iterator_support.hpp, not the particular header in which the functionality you would like to use is defined. See Public API for a list of names that are part of the public HPX API.

Header hpx/iterator_support/counting_iterator.hpp

template<typename Incrementable, typename CategoryOrTraversal, typename Difference>
class counting_iterator<Incrementable, CategoryOrTraversal, Difference, typename std::enable_if<std::is_integral<Incrementable>::value>::type> : public hpx::util::iterator_adaptor<counting_iterator<Incrementable, CategoryOrTraversal, Difference>, Incrementable, Incrementable, traversal, Incrementable const&, difference>
#include <counting_iterator.hpp>

Public Functions

counting_iterator()
counting_iterator(counting_iterator const &rhs)
counting_iterator(Incrementable x)

Private Types

template<>
using base_type = typename detail::counting_iterator_base<Incrementable, CategoryOrTraversal, Difference>::type

Private Functions

template<typename Iterator>
bool equal(Iterator const &rhs) const
void increment()
void decrement()
template<typename Distance>
void advance(Distance n)
base_type::reference dereference() const
template<typename OtherIncrementable>
base_type::difference_type distance_to(counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const &y) const

Friends

friend iterator_core_access
namespace hpx
namespace util

Functions

template<typename Incrementable>
counting_iterator<Incrementable> make_counting_iterator(Incrementable x)
template<typename Incrementable, typename CategoryOrTraversal, typename Difference, typename Enable>
class counting_iterator : public hpx::util::iterator_adaptor<counting_iterator<Incrementable, CategoryOrTraversal, Difference>, Incrementable, Incrementable, traversal, Incrementable const&, difference>
#include <counting_iterator.hpp>

Public Functions

counting_iterator()
counting_iterator(counting_iterator const &rhs)
counting_iterator(Incrementable x)

Private Types

template<>
using base_type = typename detail::counting_iterator_base<Incrementable, CategoryOrTraversal, Difference>::type

Private Functions

base_type::reference dereference() const

Friends

friend hpx::util::iterator_core_access
template<typename Incrementable, typename CategoryOrTraversal, typename Difference>
class counting_iterator<Incrementable, CategoryOrTraversal, Difference, typename std::enable_if<std::is_integral<Incrementable>::value>::type> : public hpx::util::iterator_adaptor<counting_iterator<Incrementable, CategoryOrTraversal, Difference>, Incrementable, Incrementable, traversal, Incrementable const&, difference>
#include <counting_iterator.hpp>

Public Functions

counting_iterator()
counting_iterator(counting_iterator const &rhs)
counting_iterator(Incrementable x)

Private Types

template<>
using base_type = typename detail::counting_iterator_base<Incrementable, CategoryOrTraversal, Difference>::type

Private Functions

template<typename Iterator>
bool equal(Iterator const &rhs) const
void increment()
void decrement()
template<typename Distance>
void advance(Distance n)
base_type::reference dereference() const
template<typename OtherIncrementable>
base_type::difference_type distance_to(counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const &y) const

Friends

friend hpx::util::iterator_core_access

Header hpx/iterator_support/iterator_adaptor.hpp

namespace hpx
namespace util
template<typename Derived, typename Base, typename Value = void, typename Category = void, typename Reference = void, typename Difference = void, typename Pointer = void>
class iterator_adaptor : public hpx::util::iterator_facade<Derived, value_type, iterator_category, reference_type, difference_type, Pointer>
#include <iterator_adaptor.hpp>

Subclassed by hpx::util::counting_iterator< Incrementable, CategoryOrTraversal, Difference, Enable >, hpx::util::counting_iterator< Incrementable, CategoryOrTraversal, Difference, typename std::enable_if< std::is_integral< Incrementable >::value >::type >, hpx::util::transform_iterator< Iterator, Transformer, Reference, Value, Category, Difference >

Public Types

typedef Base base_type

Public Functions

iterator_adaptor()
iterator_adaptor(Base const &iter)
Base const &base() const

Protected Types

typedef hpx::util::detail::iterator_adaptor_base<Derived, Base, Value, Category, Reference, Difference, Pointer>::type base_adaptor_type
typedef iterator_adaptor<Derived, Base, Value, Category, Reference, Difference, Pointer> iterator_adaptor_

Protected Functions

Base const &base_reference() const
Base &base_reference()

Private Functions

base_adaptor_type::reference dereference() const
template<typename OtherDerived, typename OtherIterator, typename V, typename C, typename R, typename D, typename P>
bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D, P> const &x) const
template<typename DifferenceType>
void advance(DifferenceType n)
void increment()
template<typename Iterator = Base, typename Enable = typename std::enable_if<traits::is_bidirectional_iterator<Iterator>::value>::type>
void decrement()
template<typename OtherDerived, typename OtherIterator, typename V, typename C, typename R, typename D, typename P>
base_adaptor_type::difference_type distance_to(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D, P> const &y) const

Private Members

Base iterator_

Friends

friend hpx::util::hpx::util::iterator_core_access

Header hpx/iterator_support/iterator_facade.hpp

Defines

HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type)
namespace hpx
namespace util

Functions

template<typename Derived, typename T, typename Category, typename Reference, typename Distance, typename Pointer>
util::detail::postfix_increment_result<Derived, typename Derived::value_type, typename Derived::reference>::type operator++(iterator_facade<Derived, T, Category, Reference, Distance, Pointer> &i, int)
hpx::util::HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD(inline, bool)
hpx::util::HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD(inline, !, bool)
hpx::util::HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD(inline)
hpx::util::HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD(inline, <=, bool)
hpx::util::HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD(inline, >=, bool)
hpx::util::HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD(inline, -, typename std::iterator_traits< Derived2 >::difference_type)
template<typename Derived, typename T, typename Category, typename Reference, typename Distance, typename Pointer>
Derived operator+(iterator_facade<Derived, T, Category, Reference, Distance, Pointer> const &it, typename Derived::difference_type n)
template<typename Derived, typename T, typename Category, typename Reference, typename Distance, typename Pointer>
Derived operator+(typename Derived::difference_type n, iterator_facade<Derived, T, Category, Reference, Distance, Pointer> const &it)
class iterator_core_access
#include <iterator_facade.hpp>

Public Static Functions

template<typename Iterator1, typename Iterator2>
static bool equal(Iterator1 const &lhs, Iterator2 const &rhs)
template<typename Iterator>
static void increment(Iterator &it)
template<typename Iterator>
static void decrement(Iterator &it)
template<typename Reference, typename Iterator>
static Reference dereference(Iterator const &it)
template<typename Iterator, typename Distance>
static void advance(Iterator &it, Distance n)
template<typename Iterator1, typename Iterator2>
static std::iterator_traits<Iterator1>::difference_type distance_to(Iterator1 const &lhs, Iterator2 const &rhs)
template<typename Derived, typename T, typename Category, typename Reference = T&, typename Distance = std::ptrdiff_t, typename Pointer = void>
struct iterator_facade : public hpx::util::detail::iterator_facade_base<Derived, T, Category, Reference, Distance, Pointer>
#include <iterator_facade.hpp>

Subclassed by hpx::util::iterator_adaptor< Derived, Base, Value, Category, Reference, Difference, Pointer >

Public Functions

iterator_facade()

Protected Types

typedef iterator_facade<Derived, T, Category, Reference, Distance, Pointer> iterator_adaptor_

Private Types

typedef detail::iterator_facade_base<Derived, T, Category, Reference, Distance, Pointer> base_type

Header hpx/iterator_support/iterator_range.hpp

namespace hpx
namespace util

Functions

template<typename Range, typename Iterator = typename traits::range_iterator<Range>::type, typename Sentinel = typename traits::range_iterator<Range>::type>
std::enable_if<traits::is_range<Range>::value, iterator_range<Iterator, Sentinel>>::type make_iterator_range(Range &r)
template<typename Range, typename Iterator = typename traits::range_iterator<Range const>::type, typename Sentinel = typename traits::range_iterator<Range const>::type>
std::enable_if<traits::is_range<Range>::value, iterator_range<Iterator, Sentinel>>::type make_iterator_range(Range const &r)
template<typename Iterator, typename Sentinel = Iterator>
std::enable_if<traits::is_iterator<Iterator>::value, iterator_range<Iterator, Sentinel>>::type make_iterator_range(Iterator iterator, Sentinel sentinel)
template<typename Iterator, typename Sentinel = Iterator>
class iterator_range
#include <iterator_range.hpp>

Public Functions

iterator_range()
iterator_range(Iterator iterator, Sentinel sentinel)
Iterator begin() const
Iterator end() const
std::ptrdiff_t size() const
bool empty() const

Private Members

Iterator _iterator
Sentinel _sentinel

Header hpx/iterator_support/range.hpp

namespace hpx
namespace util
namespace range_adl

Functions

template<typename C, typename Iterator = typename detail::iterator<C>::type>
constexpr Iterator begin(C &c)
template<typename C, typename Iterator = typename detail::iterator<C const>::type>
constexpr Iterator begin(C const &c)
template<typename C, typename Sentinel = typename detail::sentinel<C>::type>
constexpr Sentinel end(C &c)
template<typename C, typename Sentinel = typename detail::sentinel<C const>::type>
constexpr Sentinel end(C const &c)
template<typename C, typename Iterator = typename detail::iterator<C const>::type, typename Sentinel = typename detail::sentinel<C const>::type>
constexpr std::size_t size(C const &c)
template<typename C, typename Iterator = typename detail::iterator<C const>::type, typename Sentinel = typename detail::sentinel<C const>::type>
constexpr bool empty(C const &c)

Header hpx/iterator_support/traits/is_iterator.hpp

Header hpx/iterator_support/traits/is_range.hpp

namespace hpx
namespace traits
template<typename R>
struct range_traits<R, true> : public std::iterator_traits<util::detail::iterator<R>::type>
#include <is_range.hpp>

Public Types

typedef util::detail::iterator<R>::type iterator_type
typedef util::detail::sentinel<R>::type sentinel_type

Header hpx/iterator_support/traits/is_sentinel_for.hpp

namespace hpx
namespace traits

Variables

template<typename Sent, typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::disable_sized_sentinel_for = false

Header hpx/iterator_support/transform_iterator.hpp

namespace hpx
namespace util

Functions

template<typename Transformer, typename Iterator>
transform_iterator<Iterator, Transformer> make_transform_iterator(Iterator const &it, Transformer const &f)
template<typename Transformer, typename Iterator>
transform_iterator<Iterator, Transformer> make_transform_iterator(Iterator const &it)
template<typename Iterator, typename Transformer, typename Reference, typename Value, typename Category, typename Difference>
class transform_iterator : public hpx::util::iterator_adaptor<transform_iterator<Iterator, Transformer, Reference, Value, Category, Difference>, Iterator, value_type, iterator_category, reference_type, difference_type>
#include <transform_iterator.hpp>

Public Functions

transform_iterator()
transform_iterator(Iterator const &it)
transform_iterator(Iterator const &it, Transformer const &f)
template<typename OtherIterator, typename OtherTransformer, typename OtherReference, typename OtherValue, typename OtherCategory, typename OtherDifference>
transform_iterator(transform_iterator<OtherIterator, OtherTransformer, OtherReference, OtherValue, OtherCategory, OtherDifference> const &t, typename std::enable_if<std::is_convertible<OtherIterator, Iterator>::value && std::is_convertible<OtherTransformer, Transformer>::value && std::is_convertible<OtherCategory, Category>::value && std::is_convertible<OtherDifference, Difference>::value>::type* = nullptr)
Transformer const &transformer() const

Private Types

typedef detail::transform_iterator_base<Iterator, Transformer, Reference, Value, Category, Difference>::type base_type

Private Functions

base_type::reference dereference() const

Private Members

Transformer transformer_

Friends

friend hpx::util::hpx::util::iterator_core_access

Header hpx/iterator_support/zip_iterator.hpp

template<typename F, typename ...Ts>
struct lift_zipped_iterators<F, util::zip_iterator<Ts...>>
#include <zip_iterator.hpp>

Public Types

typedef util::zip_iterator<Ts...>::iterator_tuple_type tuple_type
typedef util::tuple<typename element_result_of<typename F::template apply<Ts>, Ts>::type...> result_type

Public Static Functions

template<std::size_t... Is, typename ...Ts_>
static result_type call(util::index_pack<Is...>, util::tuple<Ts_...> const &t)
template<typename ...Ts_>
static result_type call(util::zip_iterator<Ts_...> const &iter)
namespace hpx
namespace traits
namespace functional
template<typename F, typename ...Ts>
struct lift_zipped_iterators<F, util::zip_iterator<Ts...>>
#include <zip_iterator.hpp>

Public Types

typedef util::zip_iterator<Ts...>::iterator_tuple_type tuple_type
typedef util::tuple<typename element_result_of<typename F::template apply<Ts>, Ts>::type...> result_type

Public Static Functions

template<std::size_t... Is, typename ...Ts_>
static result_type call(util::index_pack<Is...>, util::tuple<Ts_...> const &t)
template<typename ...Ts_>
static result_type call(util::zip_iterator<Ts_...> const &iter)
namespace util

Functions

template<typename ...Ts>
zip_iterator<typename decay<Ts>::type...> make_zip_iterator(Ts&&... vs)
template<typename ...Ts>
class zip_iterator : public hpx::util::detail::zip_iterator_base<tuple<Ts...>, zip_iterator<Ts...>>
#include <zip_iterator.hpp>

Public Functions

zip_iterator()
zip_iterator(Ts const&... vs)
zip_iterator(tuple<Ts...> &&t)
zip_iterator(zip_iterator const &other)
zip_iterator(zip_iterator &&other)
zip_iterator &operator=(zip_iterator const &other)
zip_iterator &operator=(zip_iterator &&other)
template<typename ...Ts_>
std::enable_if<std::is_assignable<typename zip_iterator::iterator_tuple_type&, typename zip_iterator<Ts_...>::iterator_tuple_type&&>::value, zip_iterator&>::type operator=(zip_iterator<Ts_...> const &other)
template<typename ...Ts_>
std::enable_if<std::is_assignable<typename zip_iterator::iterator_tuple_type&, typename zip_iterator<Ts_...>::iterator_tuple_type&&>::value, zip_iterator&>::type operator=(zip_iterator<Ts_...> &&other)

Private Types

typedef detail::zip_iterator_base<tuple<Ts...>, zip_iterator<Ts...>> base_type
template<typename ...Ts>
class zip_iterator<tuple<Ts...>> : public hpx::util::detail::zip_iterator_base<tuple<Ts...>, zip_iterator<tuple<Ts...>>>
#include <zip_iterator.hpp>

Public Functions

zip_iterator()
zip_iterator(Ts const&... vs)
zip_iterator(tuple<Ts...> &&t)
zip_iterator(zip_iterator const &other)
zip_iterator(zip_iterator &&other)
zip_iterator &operator=(zip_iterator const &other)
zip_iterator &operator=(zip_iterator &&other)
template<typename ...Ts_>
std::enable_if<std::is_assignable<typename zip_iterator::iterator_tuple_type&, typename zip_iterator<Ts_...>::iterator_tuple_type&&>::value, zip_iterator&>::type operator=(zip_iterator<Ts_...> const &other)
template<typename ...Ts_>
std::enable_if<std::is_assignable<typename zip_iterator::iterator_tuple_type&, typename zip_iterator<Ts_...>::iterator_tuple_type&&>::value, zip_iterator&>::type operator=(zip_iterator<Ts_...> &&other)

Private Types

typedef detail::zip_iterator_base<tuple<Ts...>, zip_iterator<tuple<Ts...>>> base_type