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.
Defines
-
HPX_ITERATOR_TRAVERSAL_TAG_NS
¶
-
namespace
hpx
-
namespace
iterators
¶ -
struct
bidirectional_traversal_tag
: public hpx::iterators::forward_traversal_tag¶ Subclassed by hpx::iterators::random_access_traversal_tag
-
struct
forward_traversal_tag
: public hpx::iterators::single_pass_traversal_tag¶ Subclassed by hpx::iterators::bidirectional_traversal_tag
-
struct
incrementable_traversal_tag
: public hpx::iterators::no_traversal_tag¶ Subclassed by hpx::iterators::single_pass_traversal_tag
-
struct
no_traversal_tag
¶ Subclassed by hpx::iterators::incrementable_traversal_tag
-
struct
single_pass_traversal_tag
: public hpx::iterators::incrementable_traversal_tag¶ Subclassed by hpx::iterators::forward_traversal_tag
-
struct
-
namespace
traits
Typedefs
-
template<typename
Traversal
>
usingpure_traversal_tag
= HPX_ITERATOR_TRAVERSAL_TAG_NS::iterators::pure_traversal_tag<Traversal>¶
-
template<typename
Traversal
>
usingpure_traversal_tag_t
= typename pure_traversal_tag<Traversal>::type¶
-
template<typename
Iterator
>
usingpure_iterator_traversal
= HPX_ITERATOR_TRAVERSAL_TAG_NS::iterators::pure_iterator_traversal<Iterator>¶
-
template<typename
Iterator
>
usingpure_iterator_traversal_t
= typename pure_iterator_traversal<Iterator>::type¶
-
template<typename
Cat
>
usingiterator_category_to_traversal
= HPX_ITERATOR_TRAVERSAL_TAG_NS::iterators::iterator_category_to_traversal<Cat>¶
-
template<typename
Cat
>
usingiterator_category_to_traversal_t
= typename iterator_category_to_traversal<Cat>::type¶
-
template<typename
Iterator
>
usingiterator_traversal
= HPX_ITERATOR_TRAVERSAL_TAG_NS::iterators::iterator_traversal<Iterator>¶
-
template<typename
Iterator
>
usingiterator_traversal_t
= typename iterator_traversal<Iterator>::type¶
Variables
-
template<typename Traversal>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::pure_traversal_tag_v= pure_traversal_tag<Traversal>::value
-
template<typename Iterator>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::pure_iterator_traversal_v= pure_iterator_traversal<Iterator>::value
-
template<typename Cat>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::iterator_category_to_traversal_v= iterator_category_to_traversal<Cat>::value
-
template<typename Iterator>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::iterator_traversal_v= iterator_traversal<Iterator>::value
-
template<typename
-
namespace
-
template<typename
Incrementable
, typenameCategoryOrTraversal
, typenameDifference
>
classcounting_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>¶ Public Functions
-
counting_iterator
()¶
-
counting_iterator
(counting_iterator const &rhs)¶
-
counting_iterator
(Incrementable x)¶
Private Types
-
template<>
usingbase_type
= typename detail::counting_iterator_base<Incrementable, CategoryOrTraversal, Difference>::type¶
Private Functions
-
void
increment
()¶
-
void
decrement
()¶
-
base_type::reference
dereference
() const¶
-
template<typename
OtherIncrementable
>
base_type::difference_typedistance_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
, typenameCategoryOrTraversal
, typenameDifference
, typenameEnable
>
classcounting_iterator
¶ Public Functions
-
counting_iterator
()
-
counting_iterator
(counting_iterator const &rhs)
-
counting_iterator
(Incrementable x)
Private Types
-
template<>
usingbase_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
, typenameCategoryOrTraversal
, typenameDifference
>
classcounting_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> Public Functions
-
counting_iterator
()
-
counting_iterator
(counting_iterator const &rhs)
-
counting_iterator
(Incrementable x)
Private Types
-
template<>
usingbase_type
= typename detail::counting_iterator_base<Incrementable, CategoryOrTraversal, Difference>::type
Private Functions
-
template<typename
Iterator
>
boolequal
(Iterator const &rhs) const
-
void
increment
()
-
void
decrement
()
-
template<typename
Distance
>
voidadvance
(Distance n)
-
base_type::reference
dereference
() const
-
template<typename
OtherIncrementable
>
base_type::difference_typedistance_to
(counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const &y) const
Friends
-
friend
hpx::util::iterator_core_access
-
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
util
Functions
-
template<typename
Generator
>
classgenerator_iterator
: public hpx::util::iterator_facade<generator_iterator<Generator>, Generator::result_type, std::forward_iterator_tag, Generator::result_type const&>¶ Public Functions
-
generator_iterator
()¶
-
generator_iterator
(Generator *g)¶
-
void
increment
()¶
-
Generator::result_type const &
dereference
() const¶
-
bool
equal
(generator_iterator const &y) const¶
Private Types
-
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
util
-
template<typename
Derived
, typenameBase
, typenameValue
= void, typenameCategory
= void, typenameReference
= void, typenameDifference
= void, typenamePointer
= void>
classiterator_adaptor
: public hpx::util::iterator_facade<Derived, value_type, iterator_category, reference_type, difference_type, void>¶ Subclassed by hpx::util::counting_iterator< Incrementable, CategoryOrTraversal, Difference, typename std::enable_if< std::is_integral< Incrementable >::value >::type >
Public Types
-
typedef Base
base_type
¶
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_
¶
Private Functions
-
base_adaptor_type::reference
dereference
() const¶
-
template<typename
OtherDerived
, typenameOtherIterator
, typenameV
, typenameC
, typenameR
, typenameD
, typenameP
>
boolequal
(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D, P> const &x) const¶
-
template<typename
DifferenceType
>
voidadvance
(DifferenceType n)¶
-
void
increment
()¶
-
template<typename
Iterator
= Base, typenameEnable
= typename std::enable_if<traits::is_bidirectional_iterator<Iterator>::value>::type>
voiddecrement
()¶
-
template<typename
OtherDerived
, typenameOtherIterator
, typenameV
, typenameC
, typenameR
, typenameD
, typenameP
>
base_adaptor_type::difference_typedistance_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
-
typedef Base
-
template<typename
-
namespace
Defines
-
HPX_UTIL_ITERATOR_FACADE_INTEROP_HEAD
(prefix, op, result_type)¶
-
namespace
hpx
-
namespace
util
Functions
-
template<typename
Derived
, typenameT
, typenameCategory
, typenameReference
, typenameDistance
, typenamePointer
>
util::detail::postfix_increment_result<Derived, typename Derived::value_type, typename Derived::reference>::typeoperator++
(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)
-
class
iterator_core_access
¶
-
template<typename
Derived
, typenameT
, typenameCategory
, typenameReference
= T&, typenameDistance
= std::ptrdiff_t, typenamePointer
= void>
structiterator_facade
: public hpx::util::detail::iterator_facade_base<Derived, T, Category, T&, std::ptrdiff_t, void>¶ 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
¶
-
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
util
Functions
-
template<typename
Range
, typenameIterator
= typename traits::range_iterator<Range>::type, typenameSentinel
= typename traits::range_iterator<Range>::type>
std::enable_if<traits::is_range<Range>::value, iterator_range<Iterator, Sentinel>>::typemake_iterator_range
(Range &r)¶
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
util
-
namespace
range_adl
¶ Functions
-
template<typename
C
, typenameIterator
= typename detail::iterator<C>::type>
constexpr Iteratorbegin
(C &c)¶
-
template<typename
C
, typenameIterator
= typename detail::iterator<C const>::type>
constexpr Iteratorbegin
(C const &c)¶
-
template<typename
C
, typenameSentinel
= typename detail::sentinel<C>::type>
constexpr Sentinelend
(C &c)¶
-
template<typename
C
, typenameSentinel
= typename detail::sentinel<C const>::type>
constexpr Sentinelend
(C const &c)¶
-
template<typename
-
namespace
-
namespace
-
namespace
hpx
-
namespace
util
Functions
-
template<typename
Transformer
, typenameIterator
>
transform_iterator<Iterator, Transformer>make_transform_iterator
(Iterator const &it, Transformer const &f)¶
-
template<typename
Transformer
, typenameIterator
>
transform_iterator<Iterator, Transformer>make_transform_iterator
(Iterator const &it)¶
-
template<typename
Iterator
, typenameTransformer
, typenameReference
, typenameValue
, typenameCategory
, typenameDifference
>
classtransform_iterator
¶ Public Functions
-
transform_iterator
()¶
-
transform_iterator
(Iterator const &it)¶
-
transform_iterator
(Iterator const &it, Transformer const &f)¶
-
template<typename
OtherIterator
, typenameOtherTransformer
, typenameOtherReference
, typenameOtherValue
, typenameOtherCategory
, typenameOtherDifference
>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 Members
-
Transformer
transformer_
¶
Friends
-
friend
hpx::util::hpx::util::iterator_core_access
-
-
template<typename
-
namespace
-
template<typename ...
Ts
>
classzip_iterator
<hpx::tuple<Ts...>> : public hpx::util::detail::zip_iterator_base<hpx::tuple<Ts...>, zip_iterator<hpx::tuple<Ts...>>>¶ Public Functions
-
zip_iterator
()¶
-
zip_iterator
(Ts const&... vs)¶
-
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
F
, typename ...Ts
>
structlift_zipped_iterators
<F, util::zip_iterator<Ts...>>¶ Public Types
Public Static Functions
-
template<std::size_t...
Is
, typename ...Ts_
>
static result_typecall
(util::index_pack<Is...>, hpx::tuple<Ts_...> const &t)¶
-
template<typename ...
Ts_
>
static result_typecall
(util::zip_iterator<Ts_...> const &iter)¶
-
template<std::size_t...
-
namespace
hpx
-
namespace
traits
-
namespace
functional
¶ -
template<typename
F
, typename ...Ts
>
structlift_zipped_iterators
<F, util::zip_iterator<Ts...>> Public Types
-
typedef util::zip_iterator<Ts...>::iterator_tuple_type
tuple_type
-
typedef hpx::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_typecall
(util::index_pack<Is...>, hpx::tuple<Ts_...> const &t)
-
template<typename ...
Ts_
>
static result_typecall
(util::zip_iterator<Ts_...> const &iter)
-
typedef util::zip_iterator<Ts...>::iterator_tuple_type
-
template<typename
-
namespace
-
namespace
util
Functions
-
template<typename ...
Ts
>
classzip_iterator
: public hpx::util::detail::zip_iterator_base<hpx::tuple<Ts...>, zip_iterator<Ts...>>¶ Public Functions
-
zip_iterator
()
-
zip_iterator
(Ts const&... vs)
-
zip_iterator
(hpx::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
>
classzip_iterator
<hpx::tuple<Ts...>> : public hpx::util::detail::zip_iterator_base<hpx::tuple<Ts...>, zip_iterator<hpx::tuple<Ts...>>> Public Functions
-
zip_iterator
()
-
zip_iterator
(Ts const&... vs)
-
zip_iterator
(hpx::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 ...
-
namespace
-
namespace
hpx
-
namespace
traits
Typedefs
-
template<typename
Iter
>
usingis_bidirectional_iterator_t
= typename is_bidirectional_iterator<Iter>::type¶
-
template<typename
Iter
>
usingis_random_access_iterator_t
= typename is_random_access_iterator<Iter>::type¶
-
template<typename
Iter
>
usingis_segmented_local_iterator_t
= typename is_segmented_local_iterator<Iter>::type¶
Variables
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_iterator_v = is_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_output_iterator_v=is_output_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_input_iterator_v=is_input_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_forward_iterator_v=is_forward_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_bidirectional_iterator_v=is_bidirectional_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_random_access_iterator_v=is_random_access_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_segmented_iterator_v=is_segmented_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_segmented_local_iterator_v=is_segmented_local_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_zip_iterator_v=is_zip_iterator<Iter>::value
-
template<typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::is_contiguous_iterator_v=is_contiguous_iterator<Iter>::value
-
template<typename
-
namespace
-
namespace
hpx
-
namespace
hpx
-
namespace
traits
Variables
-
template<typename Sent, typename Iter>HPX_INLINE_CONSTEXPR_VARIABLE bool hpx::traits::disable_sized_sentinel_for = false
-
-
namespace
Functions
-
template<typename
Iter
, typenameValueType
, typenameEnable
= std::enable_if_t<hpx::traits::is_forward_iterator<Iter>::value>>
booloperator==
(Iter it, sentinel<ValueType> s)¶
-
template<typename
Iter
, typenameValueType
, typenameEnable
= std::enable_if_t<hpx::traits::is_forward_iterator<Iter>::value>>
booloperator==
(sentinel<ValueType> s, Iter it)¶
-
template<typename
Value
>
structiterator
¶ Public Types
-
template<>
usingvalue_type
= Value¶
-
template<>
usingpointer
= Value const*¶
-
template<>
usingreference
= Value const&¶
Public Functions
-
iterator
(Value initialState)¶
-
virtual Value
operator*
() const¶
-
virtual Value
operator->
() const¶
-
iterator &
operator++
()¶
-
iterator
operator++
(int)¶
-
iterator &
operator--
()¶
-
iterator
operator--
(int)¶
-
virtual Value
operator[]
(difference_type n) const¶
-
iterator &
operator+=
(difference_type n)¶
-
iterator
operator+
(difference_type n) const¶
-
iterator &
operator-=
(difference_type n)¶
-
iterator
operator-
(difference_type n) const¶
-
bool
operator==
(const iterator &that) const¶
-
bool
operator!=
(const iterator &that) const¶
-
bool
operator<
(const iterator &that) const¶
-
bool
operator<=
(const iterator &that) const¶
-
bool
operator>
(const iterator &that) const¶
-
bool
operator>=
(const iterator &that) const¶
Protected Attributes
-
Value
state
¶
-
template<>