PrevUpHomeNext

Struct template subrange

boost::text::subrange

Synopsis

// In header: <boost/text/subrange.hpp>

template<std::forward_iterator I, std::sentinel_for< I > S = I> 
struct subrange : public stl_interfaces::view_interface< subrange< I, I > > {
  // construct/copy/destruct
  subrange() = default;
  subrange(I, S);
  template<typename R> explicit subrange(R const &);

  // public member functions
  constexpr I begin() const;
  constexpr S end() const;
  constexpr subrange next(std::ptrdiff_t = 1) const;
  constexpr subrange prev(std::ptrdiff_t = 1) const;
  constexpr subrange & advance(std::ptrdiff_t);
  template<typename I2, typename S2, 
           typename Enable = std::enable_if_t<                std::is_convertible<I, I2>::value &&                std::is_convertible<S, S2>::value> > 
    constexpr operator subrange< I2, S2 >() const;
};

Description

subrange public construct/copy/destruct

  1. subrange() = default;
  2. subrange(I first, S last);
  3. template<typename R> explicit subrange(R const & r);

subrange public member functions

  1. constexpr I begin() const;
  2. constexpr S end() const;
  3. constexpr subrange next(std::ptrdiff_t n = 1) const;
  4. constexpr subrange prev(std::ptrdiff_t n = 1) const;
  5. constexpr subrange & advance(std::ptrdiff_t n);
  6. template<typename I2, typename S2, 
             typename Enable = std::enable_if_t<                std::is_convertible<I, I2>::value &&                std::is_convertible<S, S2>::value> > 
      constexpr operator subrange< I2, S2 >() const;

PrevUpHomeNext