string::operator+=

Append characters to the string.

Synopsis

string&
operator+=(
    string_view sv); (1)

string&
operator+=(
    char ch); (2)

Description

  • (1) appends [sv.begin(), sv.end()).

  • (2) appends ch.

Exception Safety

Strong guarantee.

Return Value

*this

Parameters

Name Description

sv

The string_view to append.

ch

The character to append.

Exceptions

Type Thrown On

boost::system::system_error

The size of the string after the operation would exceed max_size().