define string ranges over wchar/char16/char32

master
Daniel Kolesa 2017-12-31 23:42:46 +01:00
parent c4f67b08b9
commit 278b6a6269
1 changed files with 27 additions and 0 deletions

View File

@ -367,6 +367,15 @@ private:
/** @brief A mutable slice over `char`. */
using char_range = basic_char_range<char>;
/** @brief A mutable slice over `wchar_t`. */
using wchar_range = basic_char_range<wchar_t>;
/** @brief A mutable slice over `char16_t`. */
using char16_range = basic_char_range<char16_t>;
/** @brief A mutable slice over `char32_t`. */
using char32_range = basic_char_range<char32_t>;
/** @brief An immutable slice over `char`.
*
* This is used in most libostd APIs that read strings. More or less
@ -375,6 +384,24 @@ using char_range = basic_char_range<char>;
*/
using string_range = basic_char_range<char const>;
/** @brief An immutable slice over `wchar_t`.
*
* Included primarily for compatibility with other APIs.
*/
using wstring_range = basic_char_range<wchar_t const>;
/** @brief An immutable slice over `char16_t`.
*
* Included for basic UTF-16 compatibility.
*/
using u16string_range = basic_char_range<char16_t const>;
/** @brief An immutable slice over `char32_t`.
*
* Can represent UTF-32 strings.
*/
using u32string_range = basic_char_range<char32_t const>;
/* comparisons between ranges */
/** @brief Like `!lhs.compare(rhs)`. */