[#boost-urls-grammar-range] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::range :relfileprefix: ../../../ :mrdocs: A forward range of parsed elements == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/range_rule.hpp#L62[boost/url/grammar/range_rule.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class T> class range; ---- == Types [cols=2] |=== | Name | Description | xref:boost/urls/grammar/range/iterator.adoc[`iterator`] | A constant, forward iterator to elements of the range | xref:boost/urls/grammar/range/const_iterator.adoc[`const_iterator`] | A constant, forward iterator to elements of the range | xref:boost/urls/grammar/range/const_reference.adoc[`const_reference`] | The type of each element of the range | xref:boost/urls/grammar/range/difference_type.adoc[`difference_type`] | The type used to represent signed integers | xref:boost/urls/grammar/range/pointer.adoc[`pointer`] | Provided for compatibility, unused | xref:boost/urls/grammar/range/reference.adoc[`reference`] | The type of each element of the range | xref:boost/urls/grammar/range/size_type.adoc[`size_type`] | The type used to represent unsigned integers | xref:boost/urls/grammar/range/value_type.adoc[`value_type`] | The type of each element of the range |=== == Member Functions [cols=2] |=== | Name | Description | xref:boost/urls/grammar/range/2constructor-04.adoc[`range`] [.small]#[constructor]# | Constructor | xref:boost/urls/grammar/range/2destructor.adoc[`~range`] [.small]#[destructor]# | Destructor | xref:boost/urls/grammar/range/operator_assign-00.adoc[`operator=`] | Assignment | xref:boost/urls/grammar/range/begin.adoc[`begin`] | Return an iterator to the beginning | xref:boost/urls/grammar/range/empty.adoc[`empty`] | Return true if the range is empty | xref:boost/urls/grammar/range/end.adoc[`end`] | Return an iterator to the end | xref:boost/urls/grammar/range/size.adoc[`size`] | Return the number of elements in the range | xref:boost/urls/grammar/range/string.adoc[`string`] | Return the matching part of the string |=== == Friends [cols=2] |=== | Name | Description | `range_rule_t` | |=== == Description Objects of this type are forward ranges returned when parsing using the xref:boost/urls/grammar/range_rule-02.adoc[`range_rule`]. Iteration is performed by re‐parsing the underlying character buffer. Ownership of the buffer is not transferred; the caller is responsible for ensuring that the lifetime of the buffer extends until it is no longer referenced by the range. The implementation may use temporary, recycled storage for type‐erasure. Objects of type `range` are intended to be used ephemerally. That is, for short durations such as within a function scope. If it is necessary to store the range for a long period of time or with static storage duration, it is necessary to copy the contents to an object of a different type. == Template Parameters [cols=2] |=== | Name | Description | *T* | The value type of the range |=== == See Also xref:boost/urls/grammar/parse-09.adoc[`parse`], xref:boost/urls/grammar/range_rule-02.adoc[`range_rule`]. [.small]#Created with https://www.mrdocs.com[MrDocs]#