tmp/tmpqwicmwdg/{from.md → to.md}
RENAMED
|
@@ -1,30 +1,31 @@
|
|
| 1 |
-
## Suffix for `basic_string` literals <a id="basic.string.literals">[[basic.string.literals]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
string operator""s(const char* str, size_t len);
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*Returns:* `string{str,len}`
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
u16string operator""s(const char16_t* str, size_t len);
|
| 11 |
```
|
| 12 |
|
| 13 |
-
*Returns:* `u16string{str,len}`
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
u32string operator""s(const char32_t* str, size_t len);
|
| 17 |
```
|
| 18 |
|
| 19 |
-
*Returns:* `u32string{str,len}`
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
wstring operator""s(const wchar_t* str, size_t len);
|
| 23 |
```
|
| 24 |
|
| 25 |
-
*Returns:* `wstring{str,len}`
|
| 26 |
|
| 27 |
-
The same suffix `s` is used for `chrono::duration` literals
|
| 28 |
-
seconds but there is no conflict, since duration suffixes apply
|
| 29 |
-
numbers and string literal suffixes apply to character array
|
|
|
|
| 30 |
|
|
|
|
| 1 |
+
### Suffix for `basic_string` literals <a id="basic.string.literals">[[basic.string.literals]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
string operator""s(const char* str, size_t len);
|
| 5 |
```
|
| 6 |
|
| 7 |
+
*Returns:* `string{str, len}`.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
u16string operator""s(const char16_t* str, size_t len);
|
| 11 |
```
|
| 12 |
|
| 13 |
+
*Returns:* `u16string{str, len}`.
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
u32string operator""s(const char32_t* str, size_t len);
|
| 17 |
```
|
| 18 |
|
| 19 |
+
*Returns:* `u32string{str, len}`.
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
wstring operator""s(const wchar_t* str, size_t len);
|
| 23 |
```
|
| 24 |
|
| 25 |
+
*Returns:* `wstring{str, len}`.
|
| 26 |
|
| 27 |
+
[*Note 1*: The same suffix `s` is used for `chrono::duration` literals
|
| 28 |
+
denoting seconds but there is no conflict, since duration suffixes apply
|
| 29 |
+
to numbers and string literal suffixes apply to character array
|
| 30 |
+
literals. — *end note*]
|
| 31 |
|