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 a snapshot of the develop branch, built from commit 1513472fdc.
PrevUpHomeNext
basic_static_string::operator= (6 of 6 overloads)

Assign to the string.

Synopsis
template<
    typename T>
constexpr basic_static_string&
operator=(
    const T& t);
Description

Replaces the contents with those of sv, where sv is string_view_type(t).

Complexity

Linear in sv.size().

Exception Safety

Strong guarantee.

Remarks

The view can contain null characters.

Template Parameters

Type

Description

T

A type convertible to string_view_type.

Constraints
std::is_convertible<const T&, string_view>::value &&
!std::is_convertible<const T&, const CharT*>::value &&
!std::is_convertible<const T&, const basic_static_string&>::value
Return Value

*this

Parameters

Name

Description

t

The object to assign from.

Exceptions

Type

Thrown On

std::length_error

sv.size() > max_size().


PrevUpHomeNext