21 Strings library [strings]

21.3 String classes [string.classes]

21.3.2 Class template basic_­string [basic.string]

21.3.2.6 Modifiers [string.modifiers]

21.3.2.6.1 basic_­string​::​operator+= [string.op.append]

basic_string& operator+=(const basic_string& str);
Effects: Equivalent to: return append(str);
template<class T> basic_string& operator+=(const T& t);
Constraints:
  • is_­convertible_­v<const T&, basic_­string_­view<charT, traits>> is true and
  • is_­convertible_­v<const T&, const charT*> is false.
Effects: Equivalent to:
basic_string_view<charT, traits> sv = t;
return append(sv);
basic_string& operator+=(const charT* s);
Effects: Equivalent to: return append(s);
basic_string& operator+=(charT c);
Effects: Equivalent to: return append(size_­type{1}, c);
basic_string& operator+=(initializer_list<charT> il);
Effects: Equivalent to: return append(il);