:relfileprefix: ../../../
[#boost-urls-segments_base-iterator]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/segments_base.adoc[pass:[segments_base]]::iterator


A Bidirectional iterator to a path segment


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/impl/segments_base.hpp#L21[boost/url/impl/segments_base.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
class iterator;
----

===  Types
[cols=2,separator=¦]
|===
¦Name ¦Description
¦xref:boost/urls/segments_base/iterator/difference_type.adoc[`difference_type`]  ¦

¦xref:boost/urls/segments_base/iterator/iterator_category.adoc[`iterator_category`]  ¦

¦xref:boost/urls/segments_base/iterator/pointer.adoc[`pointer`]  ¦

¦xref:boost/urls/segments_base/iterator/reference.adoc[`reference`]  ¦

¦xref:boost/urls/segments_base/iterator/value_type.adoc[`value_type`]  ¦

|===
===  Member Functions
[cols=2,separator=¦]
|===
¦Name ¦Description
¦xref:boost/urls/segments_base/iterator/2constructor.adoc[`iterator`] [.small]#[constructor]# ¦
¦xref:boost/urls/segments_base/iterator/operator_not_eq.adoc[`operator!=`]  ¦

¦xref:boost/urls/segments_base/iterator/operator_star.adoc[`operator*`]  ¦

¦xref:boost/urls/segments_base/iterator/operator_inc.adoc[`operator++`]  ¦
¦xref:boost/urls/segments_base/iterator/operator_dec.adoc[`operator--`]  ¦
¦xref:boost/urls/segments_base/iterator/operator_ptr.adoc[`operator->`]  ¦

¦xref:boost/urls/segments_base/iterator/operator_assign.adoc[`operator=`]  ¦

¦xref:boost/urls/segments_base/iterator/operator_eq.adoc[`operator==`]  ¦

|===

=== Description


Objects of this type allow iteration
through the segments in the path.
Any percent-escapes in returned strings
are decoded first.
The values returned are read-only;
changes to segments must be made
through the container instead, if the
container supports modification.




The strings produced when iterators are
dereferenced belong to the iterator and
become invalidated when that particular
iterator is incremented, decremented,
or destroyed.



