value::get_string

Return a reference to the underlying string, without checking.

Synopsis

string&
get_string() & noexcept; (1)

string&&
get_string() && noexcept; (2)

string const&
get_string() const& noexcept; (3)

Description

This is the fastest way to access the underlying representation when the kind is known in advance.

Preconditions

this->is_string()

Complexity

Constant.

Exception Safety

No-throw guarantee.