![]() |
Home | Libraries | People | FAQ | More |
boost::parser::subrange
// In header: <boost/parser/subrange.hpp> template<std::forward_iterator I, std::sentinel_for< I > S = I> struct subrange { // public member functions subrange() = default; subrange(I, S); template<typename R> explicit subrange(R const &); I begin() const; S end() const; subrange next(std::ptrdiff_t = 1) const; subrange prev(std::ptrdiff_t = 1) const; 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; };
A simple view type used throughout the rest of the library in C++17 builds; similar to std::ranges::subrange
.
subrange
public member functionssubrange() = default;
subrange(I first, S last);
template<typename R> explicit subrange(R const & r);
I begin() const;
S end() const;
subrange next(std::ptrdiff_t n = 1) const;
subrange prev(std::ptrdiff_t n = 1) const;
subrange & advance(std::ptrdiff_t n);
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;