range< Iterator > Struct Template Reference

Public Types

using difference_type = typename traits::difference_type
 
using iterator = Iterator
 
using iterator_category = typename traits::iterator_category
 
using pointer = typename traits::pointer
 
using reference = typename traits::reference
 
using traits = ::std::iterator_traits< Iterator >
 
using value_type = typename traits::value_type
 

Public Member Functions

template<class Range , class = meta::when< meta::all< meta::none< ::std::is_pointer<iterator>::value, ::std::is_same<decay_t<Range>, range>::value >(), is_range<Range>::value, is_detected_convertible<iterator, impl::adl_begin_t, Range>::value >() >>
 range (Range &&r) noexcept
 
 range (::std::pair< iterator, iterator > pair) noexcept
 
 range (iterator begin_, iterator end_) noexcept
 
 range (range const &that)
 
 range (range &&that) noexcept
 
 range ()=default
 
 ~range ()=default
 
reference back () const
 
iterator begin () const
 
bool empty () const
 
iterator end () const
 
reference front () const
 
rangeoperator= (range const &that)
 
rangeoperator= (range &&that)
 
reference operator[] (difference_type idx) const
 
void pop_back (difference_type n)
 
void pop_back ()
 
void pop_back_upto (difference_type n)
 
void pop_front (difference_type n)
 
void pop_front ()
 
void pop_front_upto (difference_type n)
 
difference_type size () const
 
range slice (difference_type start, difference_type stop) const
 
range slice (difference_type start) const
 
::std::pair< range, rangesplit (difference_type idx) const
 
void swap (range &that) noexcept(is_nothrow_swappable< iterator >::value)
 

Static Public Attributes

static constexpr bool is_bidirectional
 
static constexpr bool is_forward
 
static constexpr bool is_input
 
static constexpr bool is_output
 
static constexpr bool is_random_access
 

Detailed Description


template
<
class
Iterator
>

struct core::v2::range< Iterator >

Definition at line 57 of file range.hpp.

Member Typedef Documentation

◆ difference_type

using difference_type = typename traits::difference_type

Definition at line 62 of file range.hpp.

◆ iterator

using iterator = Iterator

Definition at line 68 of file range.hpp.

◆ iterator_category

using iterator_category = typename traits::iterator_category

Definition at line 60 of file range.hpp.

◆ pointer

using pointer = typename traits::pointer

Definition at line 66 of file range.hpp.

◆ reference

using reference = typename traits::reference

Definition at line 65 of file range.hpp.

◆ traits

using traits = ::std::iterator_traits<Iterator>

Definition at line 58 of file range.hpp.

◆ value_type

using value_type = typename traits::value_type

Definition at line 63 of file range.hpp.

Constructor & Destructor Documentation

◆ range() [1/6]

range ( Range &&  r)
inlineexplicitnoexcept

Definition at line 107 of file range.hpp.

References core::v2::impl::adl_begin(), and core::v2::impl::adl_end().

◆ range() [2/6]

range ( ::std::pair< iterator, iterator pair)
inlinenoexcept

Definition at line 112 of file range.hpp.

◆ range() [3/6]

range ( iterator  begin_,
iterator  end_ 
)
inlinenoexcept

Definition at line 116 of file range.hpp.

◆ range() [4/6]

range ( range< Iterator > const &  that)
inline

Definition at line 121 of file range.hpp.

◆ range() [5/6]

range ( range< Iterator > &&  that)
inlinenoexcept

Definition at line 125 of file range.hpp.

References core::v2::move().

◆ range() [6/6]

range ( )
default

◆ ~range()

~range ( )
default

Member Function Documentation

◆ back()

reference back ( ) const
inline

Definition at line 150 of file range.hpp.

◆ begin()

iterator begin ( ) const
inline

◆ empty()

◆ end()

iterator end ( ) const
inline

Definition at line 147 of file range.hpp.

Referenced by range< Iterator >::split(), and core::v2::transform().

◆ front()

◆ operator=() [1/2]

range& operator= ( range< Iterator > const &  that)
inline

Definition at line 132 of file range.hpp.

◆ operator=() [2/2]

range& operator= ( range< Iterator > &&  that)
inline

Definition at line 136 of file range.hpp.

References core::v2::move().

◆ operator[]()

reference operator[] ( difference_type  idx) const
inline

Definition at line 141 of file range.hpp.

◆ pop_back() [1/2]

void pop_back ( difference_type  n)
inline

Definition at line 249 of file range.hpp.

◆ pop_back() [2/2]

void pop_back ( )
inline

Definition at line 254 of file range.hpp.

◆ pop_back_upto()

void pop_back_upto ( difference_type  n)
inline

Definition at line 268 of file range.hpp.

References core::v2::min(), and core::v2::size().

Referenced by range< Iterator >::split().

◆ pop_front() [1/2]

◆ pop_front() [2/2]

void pop_front ( )
inline

Definition at line 247 of file range.hpp.

◆ pop_front_upto()

void pop_front_upto ( difference_type  n)
inline

Definition at line 260 of file range.hpp.

References core::v2::min(), and core::v2::size().

Referenced by range< Iterator >::split().

◆ size()

difference_type size ( ) const
inline

Definition at line 157 of file range.hpp.

Referenced by core::v2::impl::equal().

◆ slice() [1/2]

range slice ( difference_type  start,
difference_type  stop 
) const
inline

Definition at line 163 of file range.hpp.

References core::v2::size().

◆ slice() [2/2]

range slice ( difference_type  start) const
inline

Definition at line 227 of file range.hpp.

◆ split()

◆ swap()

void swap ( range< Iterator > &  that)
inlinenoexcept

Definition at line 276 of file range.hpp.

References core::v2::swap().

Member Data Documentation

◆ is_bidirectional

constexpr bool is_bidirectional
static
Initial value:
= ::std::is_convertible<
::std::bidirectional_iterator_tag
>::value

Definition at line 85 of file range.hpp.

◆ is_forward

constexpr bool is_forward
static
Initial value:
= ::std::is_convertible<
::std::forward_iterator_tag
>::value

Definition at line 80 of file range.hpp.

◆ is_input

constexpr bool is_input
static
Initial value:
= ::std::is_convertible<
::std::input_iterator_tag
>::value

Definition at line 70 of file range.hpp.

◆ is_output

constexpr bool is_output
static
Initial value:
= ::std::is_convertible<
::std::output_iterator_tag
>::value

Definition at line 75 of file range.hpp.

◆ is_random_access

constexpr bool is_random_access
static
Initial value:
= ::std::is_convertible<
::std::random_access_iterator_tag
>::value

Definition at line 90 of file range.hpp.


The documentation for this struct was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-git/src/mlpack/core/std_backport/range.hpp