fs/AllocatedPath: add string_view constructor

This commit is contained in:
Max Kellermann 2020-03-13 19:46:12 +01:00
parent 189f6eaa6f
commit 1d560c8f0f

View File

@ -47,6 +47,9 @@ class AllocatedPath {
explicit AllocatedPath(const_pointer _value) noexcept
:value(_value) {}
explicit AllocatedPath(string_view _value) noexcept
:value(_value) {}
AllocatedPath(const_pointer _begin, const_pointer _end) noexcept
:value(_begin, _end) {}
@ -141,6 +144,11 @@ public:
return AllocatedPath(fs);
}
gcc_pure
static AllocatedPath FromFS(string_view fs) noexcept {
return AllocatedPath(fs);
}
gcc_pure
static AllocatedPath FromFS(const_pointer _begin,
const_pointer _end) noexcept {