tmp/tmpddnwil6l/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Header `<string_view>` synopsis <a id="string.view.synop">[[string.view.synop]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
// [string.view.template], class template basic_string_view
|
| 6 |
+
template<class charT, class traits = char_traits<charT>>
|
| 7 |
+
class basic_string_view;
|
| 8 |
+
|
| 9 |
+
// [string.view.comparison], non-member comparison functions
|
| 10 |
+
template<class charT, class traits>
|
| 11 |
+
constexpr bool operator==(basic_string_view<charT, traits> x,
|
| 12 |
+
basic_string_view<charT, traits> y) noexcept;
|
| 13 |
+
template<class charT, class traits>
|
| 14 |
+
constexpr bool operator!=(basic_string_view<charT, traits> x,
|
| 15 |
+
basic_string_view<charT, traits> y) noexcept;
|
| 16 |
+
template<class charT, class traits>
|
| 17 |
+
constexpr bool operator< (basic_string_view<charT, traits> x,
|
| 18 |
+
basic_string_view<charT, traits> y) noexcept;
|
| 19 |
+
template<class charT, class traits>
|
| 20 |
+
constexpr bool operator> (basic_string_view<charT, traits> x,
|
| 21 |
+
basic_string_view<charT, traits> y) noexcept;
|
| 22 |
+
template<class charT, class traits>
|
| 23 |
+
constexpr bool operator<=(basic_string_view<charT, traits> x,
|
| 24 |
+
basic_string_view<charT, traits> y) noexcept;
|
| 25 |
+
template<class charT, class traits>
|
| 26 |
+
constexpr bool operator>=(basic_string_view<charT, traits> x,
|
| 27 |
+
basic_string_view<charT, traits> y) noexcept;
|
| 28 |
+
// see [string.view.comparison], sufficient additional overloads of comparison functions
|
| 29 |
+
|
| 30 |
+
// [string.view.io], inserters and extractors
|
| 31 |
+
template<class charT, class traits>
|
| 32 |
+
basic_ostream<charT, traits>&
|
| 33 |
+
operator<<(basic_ostream<charT, traits>& os,
|
| 34 |
+
basic_string_view<charT, traits> str);
|
| 35 |
+
|
| 36 |
+
// basic_string_view typedef names
|
| 37 |
+
using string_view = basic_string_view<char>;
|
| 38 |
+
using u16string_view = basic_string_view<char16_t>;
|
| 39 |
+
using u32string_view = basic_string_view<char32_t>;
|
| 40 |
+
using wstring_view = basic_string_view<wchar_t>;
|
| 41 |
+
|
| 42 |
+
// [string.view.hash], hash support
|
| 43 |
+
template<class T> struct hash;
|
| 44 |
+
template<> struct hash<string_view>;
|
| 45 |
+
template<> struct hash<u16string_view>;
|
| 46 |
+
template<> struct hash<u32string_view>;
|
| 47 |
+
template<> struct hash<wstring_view>;
|
| 48 |
+
|
| 49 |
+
inline namespace literals {
|
| 50 |
+
inline namespace string_view_literals {
|
| 51 |
+
// [string.view.literals], suffix for basic_string_view literals
|
| 52 |
+
constexpr string_view operator""sv(const char* str, size_t len) noexcept;
|
| 53 |
+
constexpr u16string_view operator""sv(const char16_t* str, size_t len) noexcept;
|
| 54 |
+
constexpr u32string_view operator""sv(const char32_t* str, size_t len) noexcept;
|
| 55 |
+
constexpr wstring_view operator""sv(const wchar_t* str, size_t len) noexcept;
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
The function templates defined in [[utility.swap]] and
|
| 62 |
+
[[iterator.range]] are available when `<string_view>` is included.
|
| 63 |
+
|