boost::text::basic_unencoded_rope_view
// In header: <boost/text/unencoded_rope_view.hpp> template<typename Char, typename String> struct basic_unencoded_rope_view : public stl_interfaces::view_interface< basic_unencoded_rope_view< Char, String > > { // types typedef Char value_type; typedef std::size_t size_type; typedef unspecified iterator; typedef iterator const_iterator; typedef stl_interfaces::reverse_iterator< iterator > reverse_iterator; typedef reverse_iterator const_reverse_iterator; typedef String string; typedef boost::text::basic_string_view< Char > string_view; // construct/copy/destruct basic_unencoded_rope_view(); basic_unencoded_rope_view(basic_unencoded_rope_view const &); basic_unencoded_rope_view(basic_unencoded_rope< Char, String > const &, size_type, size_type); basic_unencoded_rope_view(string const &); basic_unencoded_rope_view(string &&) = delete; basic_unencoded_rope_view(string const &, size_type, size_type); basic_unencoded_rope_view(value_type const *); basic_unencoded_rope_view(string_view); template<std::ranges::contiguous_range R> explicit basic_unencoded_rope_view(R const &); basic_unencoded_rope_view & operator=(basic_unencoded_rope_view const &); basic_unencoded_rope_view & operator=(basic_unencoded_rope< Char, String > const &); basic_unencoded_rope_view & operator=(string const &); basic_unencoded_rope_view & operator=(basic_unencoded_rope< Char, String > &&) = delete; basic_unencoded_rope_view & operator=(string &&) = delete; basic_unencoded_rope_view & operator=(value_type const *); basic_unencoded_rope_view & operator=(string_view); template<std::ranges::contiguous_range R> basic_unencoded_rope_view & operator=(R const &); // public member functions const_iterator begin() const; const_iterator end() const; const_iterator cbegin() const; const_iterator cend() const; const_reverse_iterator rbegin() const; const_reverse_iterator rend() const; const_reverse_iterator crbegin() const; const_reverse_iterator crend() const; basic_unencoded_rope_view operator()(std::ptrdiff_t, std::ptrdiff_t) const; int compare(basic_unencoded_rope_view) const; // friend functions std::ostream & operator<<(std::ostream &, basic_unencoded_rope_view); };
A reference to a substring of a basic_unencoded_rope, std::string<Char>, or std::string_view<Char>. The String template parameter refers to the type used in a basic_unencoded_rope to which this view may refer. It is otherwise unused.
basic_unencoded_rope_view
public
construct/copy/destructbasic_unencoded_rope_view();
Default ctor.
Postconditions: |
size() == 0 && begin() == end() |
basic_unencoded_rope_view(basic_unencoded_rope_view const & other);
basic_unencoded_rope_view(basic_unencoded_rope< Char, String > const & r, size_type lo, size_type hi);
Constructs a substring of r, comprising the elements at offsets [lo, hi). If either of lo or hi is a negative value x, x is taken to be an offset from the end, and so x + size() is used instead.
These preconditions apply to the values used after size() is added to any negative arguments.
Requires: |
0 <= lo && lo <= r.size() |
Requires: |
0 <= hi && lhi <= r.size() |
Requires: |
lo <= hi |
Postconditions: |
size() == r.size() && begin() == r.begin() + lo && end() == r.begin() + hi |
basic_unencoded_rope_view(string const & s);
Constructs a covering the entire given string. basic_unencoded_rope_view
basic_unencoded_rope_view(string && r) = delete;
Forbid construction from a temporary string.
basic_unencoded_rope_view(string const & s, size_type lo, size_type hi);
Constructs a substring of s, comprising the elements at offsets [lo, hi). If either of lo or hi is a negative value x, x is taken to be an offset from the end, and so x + size() is used instead.
These preconditions apply to the values used after size() is added to any negative arguments.
Requires: |
0 <= lo && lo <= s.size() |
Requires: |
0 <= hi && lhi <= s.size() |
Requires: |
lo <= hi |
Postconditions: |
size() == s.size() && begin() == s.begin() + lo && end() == s.begin() + hi |
basic_unencoded_rope_view(value_type const * c_str);
Constructs a from a null-terminated C string. basic_unencoded_rope_view
basic_unencoded_rope_view(string_view sv);
Constructs a covering the entire given basic_unencoded_rope_viewstring_view.
template<std::ranges::contiguous_range R> explicit basic_unencoded_rope_view(R const & r);
Constructs a from a range of basic_unencoded_rope_viewvalue_type.
basic_unencoded_rope_view & operator=(basic_unencoded_rope_view const & other);
basic_unencoded_rope_view & operator=(basic_unencoded_rope< Char, String > const & r);
Assignment from a . basic_unencoded_rope
basic_unencoded_rope_view & operator=(string const & s);
Assignment from a string.
basic_unencoded_rope_view & operator=(basic_unencoded_rope< Char, String > && r) = delete;
Forbid assignment from a . basic_unencoded_rope
basic_unencoded_rope_view & operator=(string && s) = delete;
Forbid assignment from a string.
basic_unencoded_rope_view & operator=(value_type const * c_str);
Assignment from a null-terminated C string.
basic_unencoded_rope_view & operator=(string_view sv);
Assignment from a string_view.
template<std::ranges::contiguous_range R> basic_unencoded_rope_view & operator=(R const & r);
Assignment from a contiguous range of value_type elements.
basic_unencoded_rope_view public member functionsconst_iterator begin() const;
const_iterator end() const;
const_iterator cbegin() const;
const_iterator cend() const;
const_reverse_iterator rbegin() const;
const_reverse_iterator rend() const;
const_reverse_iterator crbegin() const;
const_reverse_iterator crend() const;
basic_unencoded_rope_view operator()(std::ptrdiff_t lo, std::ptrdiff_t hi) const;
Returns a substring of *this, comprising the elements at offsets [lo, hi). If either of lo or hi is a negative value x, x is taken to be an offset from the end, and so x + size() is used instead.
These preconditions apply to the values used after size() is added to any negative arguments.
Requires: |
0 <= lo && lo <= size() |
Requires: |
0 <= hi && lhi <= size() |
Requires: |
lo <= hi |
int compare(basic_unencoded_rope_view rhs) const;
Lexicographical compare. Returns a value < 0 when *this is lexicographically less than rhs, 0 if *this == rhs, and a value > 0 if *this is lexicographically greater than rhs.
basic_unencoded_rope_view friend functionsstd::ostream & operator<<(std::ostream & os, basic_unencoded_rope_view rv);
Stream inserter; performs unformatted output.