Class iterator
Synopsis
#include "breeze/text/set_of_chars.hpp"
class iterator
Description
An iterator for the set.
Iterates over all of the characters in the set. It is a constant forward iterator (iterator
and const_iterator
have the same semantics).
Iterator operations
operator!= | ||
operator* | ||
operator++ overload | ||
operator== |
Methods
iterator overload | Constructs a one-past-the-end iterator. | |
iterator overload | Constructs an iterator to the first character in sc . |
Source
Lines 269-317 in breeze/text/set_of_chars.hpp.
class iterator
{
public:
//!\name Typedefs for the standard library
//!\{
// -------------------------------------------------------------------
typedef std::forward_iterator_tag
iterator_category ;
typedef char value_type ;
typedef int difference_type ;
typedef char const *pointer ;
typedef char const &reference ;
//!\}
//! Constructs a one-past-the-end iterator.
// -------------------------------------------------------------------
iterator() noexcept ;
//! Constructs an iterator to the first character in \c sc.
// -------------------------------------------------------------------
explicit iterator( set_of_chars const & sc ) noexcept ;
//!\name Iterator operations
//!\{
// -------------------------------------------------------------------
value_type operator *() const noexcept ;
iterator & operator ++() & noexcept ;
iterator operator ++( int ) & noexcept ;
//! \note
//! It's undefined behavior to compare iterators into
//! different objects.
// -------------------------------------------------------------------
bool operator ==( iterator const & ) const noexcept ;
//! \note
//! It's undefined behavior to compare iterators into
//! different objects.
// -------------------------------------------------------------------
bool operator !=( iterator const & ) const noexcept ;
//!\}
private:
bits_type const * m_owner ;
index_type m_index ;
void increment() noexcept ;
void assert_refers_to_a_char() const ;
} ;