Files
2025-10-25 03:02:53 +03:00

82 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[string.op.append]
# 27 Strings library [[strings]](./#strings)
## 27.4 String classes [[string.classes]](string.classes#string.op.append)
### 27.4.3 Class template basic_string [[basic.string]](basic.string#string.op.append)
#### 27.4.3.7 Modifiers [[string.modifiers]](string.modifiers#string.op.append)
#### 27.4.3.7.1 basic_string::operator+= [string.op.append]
[🔗](#lib:operator+=,basic_string)
`constexpr basic_string& operator+=(const basic_string& str);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L3178)
*Effects*: Equivalent to: return append(str);
[🔗](#lib:operator+=,basic_string_)
`template<class T>
constexpr basic_string& operator+=(const T& t);
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L3192)
*Constraints*:
- [(2.1)](#2.1)
is_convertible_v<const T&, basic_string_view<charT, traits>> istrue and
- [(2.2)](#2.2)
is_convertible_v<const T&, const charT*> isfalse[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L3203)
*Effects*: Equivalent to:basic_string_view<charT, traits> sv = t;return append(sv);
[🔗](#lib:operator+=,basic_string__)
`constexpr basic_string& operator+=(const charT* s);
`
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L3218)
*Effects*: Equivalent to: return append(s);
[🔗](#lib:operator+=,basic_string___)
`constexpr basic_string& operator+=(charT c);
`
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L3229)
*Effects*: Equivalent to: return append(size_type{1}, c);
[🔗](#lib:operator+=,basic_string____)
`constexpr basic_string& operator+=(initializer_list<charT> il);
`
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L3240)
*Effects*: Equivalent to: return append(il);