class ChunkIterator

Defined at line 453 of file ../../third_party/abseil-cpp/absl/strings/cord.h

----------------------------------------------------------------------------

Cord::ChunkIterator

----------------------------------------------------------------------------

A `Cord::ChunkIterator` allows iteration over the constituent chunks of its

Cord. Such iteration allows you to perform non-const operations on the data

of a Cord without modifying it.

Generally, you do not instantiate a `Cord::ChunkIterator` directly;

instead, you create one implicitly through use of the `Cord::Chunks()`

member function.

The `Cord::ChunkIterator` has the following properties:

* The iterator is invalidated after any non-const operation on the

Cord object over which it iterates.

* The `string_view` returned by dereferencing a valid, non-`end()`

iterator is guaranteed to be non-empty.

* Two `ChunkIterator` objects can be compared equal if and only if they

remain valid and iterate over the same Cord.

* The iterator in this case is a proxy iterator; the `string_view`

returned by the iterator does not live inside the Cord, and its

lifetime is limited to the lifetime of the iterator itself. To help

prevent lifetime issues, `ChunkIterator::reference` is not a true

reference type and is equivalent to `value_type`.

* The iterator keeps state that can grow for Cords that contain many

nodes and are imbalanced due to sharing. Prefer to pass this type by

const reference instead of by value.

Public Methods

void ChunkIterator ()

Defined at line 461 of file ../../third_party/abseil-cpp/absl/strings/cord.h

ChunkIterator & operator++ ()

Defined at line 1500 of file ../../third_party/abseil-cpp/absl/strings/cord.h

ChunkIterator operator++ (int )

Defined at line 1516 of file ../../third_party/abseil-cpp/absl/strings/cord.h

bool operator== (const ChunkIterator & other)

Defined at line 1522 of file ../../third_party/abseil-cpp/absl/strings/cord.h

bool operator!= (const ChunkIterator & other)

Defined at line 1526 of file ../../third_party/abseil-cpp/absl/strings/cord.h

reference operator* ()

Defined at line 1530 of file ../../third_party/abseil-cpp/absl/strings/cord.h

pointer operator-> ()

Defined at line 1535 of file ../../third_party/abseil-cpp/absl/strings/cord.h

Friends

class CharIterator
class Cord