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
field_view::as_string

Retrieves the underlying value as a string or throws an exception.

Synopsis
constexpr string_view
as_string() const;
Exception safety

Strong guarantee. Throws on type mismatch.

Exceptions

Type

Thrown On

bad_field_access

If !this->is_string()

Object lifetimes

The returned view has the same lifetime rules as *this (it's valid as long as *this is valid).


PrevUpHomeNext