tmp/tmpdpw8s0ge/{from.md → to.md}
RENAMED
|
@@ -1,57 +1,56 @@
|
|
| 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
|
| 15 |
-
|
| 16 |
-
|
| 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 |
}
|
|
|
|
| 1 |
### Header `<string_view>` synopsis <a id="string.view.synop">[[string.view.synop]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
+
#include <compare> // see [compare.syn]
|
| 5 |
+
|
| 6 |
namespace std {
|
| 7 |
// [string.view.template], class template basic_string_view
|
| 8 |
template<class charT, class traits = char_traits<charT>>
|
| 9 |
class basic_string_view;
|
| 10 |
|
| 11 |
+
template<class charT, class traits>
|
| 12 |
+
inline constexpr bool ranges::enable_view<basic_string_view<charT, traits>> = true;
|
| 13 |
+
template<class charT, class traits>
|
| 14 |
+
inline constexpr bool ranges::enable_borrowed_range<basic_string_view<charT, traits>> = true;
|
| 15 |
+
|
| 16 |
// [string.view.comparison], non-member comparison functions
|
| 17 |
template<class charT, class traits>
|
| 18 |
constexpr bool operator==(basic_string_view<charT, traits> x,
|
| 19 |
basic_string_view<charT, traits> y) noexcept;
|
| 20 |
template<class charT, class traits>
|
| 21 |
+
constexpr see below operator<=>(basic_string_view<charT, traits> x,
|
| 22 |
+
\itcorr basic_string_view<charT, traits> y) noexcept;
|
| 23 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
// see [string.view.comparison], sufficient additional overloads of comparison functions
|
| 25 |
|
| 26 |
// [string.view.io], inserters and extractors
|
| 27 |
template<class charT, class traits>
|
| 28 |
basic_ostream<charT, traits>&
|
| 29 |
operator<<(basic_ostream<charT, traits>& os,
|
| 30 |
basic_string_view<charT, traits> str);
|
| 31 |
|
| 32 |
// basic_string_view typedef names
|
| 33 |
using string_view = basic_string_view<char>;
|
| 34 |
+
using u8string_view = basic_string_view<char8_t>;
|
| 35 |
using u16string_view = basic_string_view<char16_t>;
|
| 36 |
using u32string_view = basic_string_view<char32_t>;
|
| 37 |
using wstring_view = basic_string_view<wchar_t>;
|
| 38 |
|
| 39 |
// [string.view.hash], hash support
|
| 40 |
template<class T> struct hash;
|
| 41 |
template<> struct hash<string_view>;
|
| 42 |
+
template<> struct hash<u8string_view>;
|
| 43 |
template<> struct hash<u16string_view>;
|
| 44 |
template<> struct hash<u32string_view>;
|
| 45 |
template<> struct hash<wstring_view>;
|
| 46 |
|
| 47 |
inline namespace literals {
|
| 48 |
inline namespace string_view_literals {
|
| 49 |
// [string.view.literals], suffix for basic_string_view literals
|
| 50 |
constexpr string_view operator""sv(const char* str, size_t len) noexcept;
|
| 51 |
+
constexpr u8string_view operator""sv(const char8_t* str, size_t len) noexcept;
|
| 52 |
constexpr u16string_view operator""sv(const char16_t* str, size_t len) noexcept;
|
| 53 |
constexpr u32string_view operator""sv(const char32_t* str, size_t len) noexcept;
|
| 54 |
constexpr wstring_view operator""sv(const wchar_t* str, size_t len) noexcept;
|
| 55 |
}
|
| 56 |
}
|