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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
rows::value_type

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

Synopsis
using value_type = row;
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.

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=

Copy assignment.

Move assignment.

Replaces the contents with a row_view.

operator[]

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

operator row_view

Creates a row_view that references *this.

row

Constructs an empty row.

Copy constructor.

Move constructor.

Constructs a row from a row_view.

size

Returns the number of fields in the row.

~row [destructor]

Destructor.

Related Functions

Name

Description

operator==

Equality operator.

operator!=

Inequality operator.

Although owning, row is read-only. It's optimized for memory re-use. If you need to mutate fields, use a std::vector<field> instead (see row_view::as_vector and row::as_vector).

Object lifetimes

A row object owns a chunk of memory in which it stores its elements. On element access (using iterators, row::at or row::operator[]) it returns field_view's pointing into the row's internal storage. These views behave like references, and are valid as long as pointers, iterators and references into the row remain valid.

Description

Note that element accesors (like rows_view::operator[]) return reference objects instead of value_type objects. You can use this type if you need an owning class.


PrevUpHomeNext