tmp/tmp8j007une/{from.md → to.md}
RENAMED
|
@@ -44,36 +44,43 @@ namespace std {
|
|
| 44 |
|
| 45 |
// [string.view.capacity], capacity
|
| 46 |
constexpr size_type size() const noexcept;
|
| 47 |
constexpr size_type length() const noexcept;
|
| 48 |
constexpr size_type max_size() const noexcept;
|
| 49 |
-
|
| 50 |
|
| 51 |
// [string.view.access], element access
|
| 52 |
constexpr const_reference operator[](size_type pos) const;
|
| 53 |
-
constexpr const_reference at(size_type pos) const;
|
| 54 |
constexpr const_reference front() const;
|
| 55 |
constexpr const_reference back() const;
|
| 56 |
constexpr const_pointer data() const noexcept;
|
| 57 |
|
| 58 |
// [string.view.modifiers], modifiers
|
| 59 |
constexpr void remove_prefix(size_type n);
|
| 60 |
constexpr void remove_suffix(size_type n);
|
| 61 |
constexpr void swap(basic_string_view& s) noexcept;
|
| 62 |
|
| 63 |
// [string.view.ops], string operations
|
| 64 |
-
constexpr size_type copy(charT* s, size_type n,
|
|
|
|
| 65 |
|
| 66 |
-
constexpr basic_string_view substr(size_type pos = 0,
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
constexpr int compare(basic_string_view s) const noexcept;
|
| 69 |
-
constexpr int compare(size_type pos1, size_type n1,
|
|
|
|
| 70 |
constexpr int compare(size_type pos1, size_type n1, basic_string_view s,
|
| 71 |
-
size_type pos2, size_type n2) const;
|
| 72 |
constexpr int compare(const charT* s) const;
|
| 73 |
-
constexpr int compare(size_type pos1, size_type n1,
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
|
| 76 |
constexpr bool starts_with(basic_string_view x) const noexcept;
|
| 77 |
constexpr bool starts_with(charT x) const noexcept;
|
| 78 |
constexpr bool starts_with(const charT* x) const;
|
| 79 |
constexpr bool ends_with(basic_string_view x) const noexcept;
|
|
@@ -137,15 +144,14 @@ same type as `charT`. — *end note*]
|
|
| 137 |
|
| 138 |
For a `basic_string_view str`, any operation that invalidates a pointer
|
| 139 |
in the range
|
| 140 |
|
| 141 |
``` cpp
|
| 142 |
-
{[}str.data(),
|
| 143 |
```
|
| 144 |
|
| 145 |
-
invalidates pointers, iterators, and references
|
| 146 |
-
member functions.
|
| 147 |
|
| 148 |
The complexity of `basic_string_view` member functions is 𝑂(1) unless
|
| 149 |
otherwise specified.
|
| 150 |
|
| 151 |
`basic_string_view<charT, traits>` is a trivially copyable type
|
|
|
|
| 44 |
|
| 45 |
// [string.view.capacity], capacity
|
| 46 |
constexpr size_type size() const noexcept;
|
| 47 |
constexpr size_type length() const noexcept;
|
| 48 |
constexpr size_type max_size() const noexcept;
|
| 49 |
+
constexpr bool empty() const noexcept;
|
| 50 |
|
| 51 |
// [string.view.access], element access
|
| 52 |
constexpr const_reference operator[](size_type pos) const;
|
| 53 |
+
constexpr const_reference at(size_type pos) const; // freestanding-deleted
|
| 54 |
constexpr const_reference front() const;
|
| 55 |
constexpr const_reference back() const;
|
| 56 |
constexpr const_pointer data() const noexcept;
|
| 57 |
|
| 58 |
// [string.view.modifiers], modifiers
|
| 59 |
constexpr void remove_prefix(size_type n);
|
| 60 |
constexpr void remove_suffix(size_type n);
|
| 61 |
constexpr void swap(basic_string_view& s) noexcept;
|
| 62 |
|
| 63 |
// [string.view.ops], string operations
|
| 64 |
+
constexpr size_type copy(charT* s, size_type n,
|
| 65 |
+
size_type pos = 0) const; // freestanding-deleted
|
| 66 |
|
| 67 |
+
constexpr basic_string_view substr(size_type pos = 0,
|
| 68 |
+
size_type n = npos) const; // freestanding-deleted
|
| 69 |
+
constexpr basic_string_view subview(size_type pos = 0,
|
| 70 |
+
size_type n = npos) const; // freestanding-deleted
|
| 71 |
|
| 72 |
constexpr int compare(basic_string_view s) const noexcept;
|
| 73 |
+
constexpr int compare(size_type pos1, size_type n1,
|
| 74 |
+
basic_string_view s) const; // freestanding-deleted
|
| 75 |
constexpr int compare(size_type pos1, size_type n1, basic_string_view s,
|
| 76 |
+
size_type pos2, size_type n2) const; // freestanding-deleted
|
| 77 |
constexpr int compare(const charT* s) const;
|
| 78 |
+
constexpr int compare(size_type pos1, size_type n1,
|
| 79 |
+
const charT* s) const; // freestanding-deleted
|
| 80 |
+
constexpr int compare(size_type pos1, size_type n1, const charT* s,
|
| 81 |
+
size_type n2) const; // freestanding-deleted
|
| 82 |
|
| 83 |
constexpr bool starts_with(basic_string_view x) const noexcept;
|
| 84 |
constexpr bool starts_with(charT x) const noexcept;
|
| 85 |
constexpr bool starts_with(const charT* x) const;
|
| 86 |
constexpr bool ends_with(basic_string_view x) const noexcept;
|
|
|
|
| 144 |
|
| 145 |
For a `basic_string_view str`, any operation that invalidates a pointer
|
| 146 |
in the range
|
| 147 |
|
| 148 |
``` cpp
|
| 149 |
+
{[}str.data(), str.data() + str.size(){)}
|
| 150 |
```
|
| 151 |
|
| 152 |
+
invalidates pointers, iterators, and references to elements of `str`.
|
|
|
|
| 153 |
|
| 154 |
The complexity of `basic_string_view` member functions is 𝑂(1) unless
|
| 155 |
otherwise specified.
|
| 156 |
|
| 157 |
`basic_string_view<charT, traits>` is a trivially copyable type
|