21 Strings library [strings]

21.3 String classes [string.classes]

21.3.3 Class template basic_­string [basic.string]

21.3.3.7 Modifiers [string.modifiers]

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

constexpr basic_string& operator+=(const basic_string& str);
Effects: Equivalent to: return append(str);
template<class T> constexpr 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);
constexpr basic_string& operator+=(const charT* s);
Effects: Equivalent to: return append(s);
constexpr basic_string& operator+=(charT c);
Effects: Equivalent to: return append(size_­type{1}, c);
constexpr basic_string& operator+=(initializer_list<charT> il);
Effects: Equivalent to: return append(il);