Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext
rows_view::reference

The reference type.

Synopsis
using reference = row_view;
Types

Name

Description

const_iterator

A random access iterator to an element.

const_reference

The reference type.

difference_type

A signed integer type used to represent differences.

iterator

A random access iterator to an element.

reference

The reference type.

size_type

An unsigned integer type to represent sizes.

value_type

A type that can hold elements in this collection with value semantics.

Member Functions

Name

Description

as_vector

Converts the row into a std::vector of field's.

Converts the row into a std::vector of field's.

at

Returns the i-th element in the row or throws an exception.

back

Returns the last element in the row.

begin

Returns an iterator to the first field in the row.

empty

Returns true if there are no fields in the row (i.e. this->size() == 0).

end

Returns an iterator to one-past-the-last field in the row.

front

Returns the first element in the row.

operator[]

Returns the i-th element in the row (unchecked access).

row_view

Constructs an empty (but valid) view.

size

Returns the number of fields in the row.

Related Functions

Name

Description

operator==

Equality operator.

operator!=

Inequality operator.

A row_view points to memory owned by an external entity (like string_view does). The validity of a row_view depends on how it was obtained:

Calling any member function on an invalid view results in undefined behavior.

When indexed (by using iterators, row_view::at or row_view::operator[]), it returns field_view elements that are valid as long as the underlying storage that *this points to is valid. Destroying a row_view doesn't invalidate field_views obtained from it.

Instances of this class are usually created by the library, not by the user.


PrevUpHomeNext