fs/Traits: add string_view
This commit is contained in:
parent
87f78b9c39
commit
189f6eaa6f
@ -37,6 +37,7 @@
|
|||||||
class AllocatedPath {
|
class AllocatedPath {
|
||||||
using Traits = PathTraitsFS;
|
using Traits = PathTraitsFS;
|
||||||
using string = Traits::string;
|
using string = Traits::string;
|
||||||
|
using string_view = Traits::string_view;
|
||||||
using value_type = Traits::value_type;
|
using value_type = Traits::value_type;
|
||||||
using pointer = Traits::pointer;
|
using pointer = Traits::pointer;
|
||||||
using const_pointer = Traits::const_pointer;
|
using const_pointer = Traits::const_pointer;
|
||||||
|
@ -44,8 +44,10 @@
|
|||||||
struct PathTraitsFS {
|
struct PathTraitsFS {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
using string = std::wstring;
|
using string = std::wstring;
|
||||||
|
using string_view = std::wstring_view;
|
||||||
#else
|
#else
|
||||||
using string = std::string;
|
using string = std::string;
|
||||||
|
using string_view = std::string_view;
|
||||||
#endif
|
#endif
|
||||||
using char_traits = string::traits_type;
|
using char_traits = string::traits_type;
|
||||||
using value_type = char_traits::char_type;
|
using value_type = char_traits::char_type;
|
||||||
@ -177,6 +179,7 @@ struct PathTraitsFS {
|
|||||||
*/
|
*/
|
||||||
struct PathTraitsUTF8 {
|
struct PathTraitsUTF8 {
|
||||||
using string = std::string;
|
using string = std::string;
|
||||||
|
using string_view = std::string_view;
|
||||||
using char_traits = string::traits_type;
|
using char_traits = string::traits_type;
|
||||||
using value_type = char_traits::char_type;
|
using value_type = char_traits::char_type;
|
||||||
using pointer = value_type *;
|
using pointer = value_type *;
|
||||||
|
Loading…
Reference in New Issue
Block a user