Commit 1d560c8f authored by Max Kellermann's avatar Max Kellermann

fs/AllocatedPath: add `string_view` constructor

parent 189f6eaa
......@@ -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) {}
......@@ -142,6 +145,11 @@ public:
}
gcc_pure
static AllocatedPath FromFS(string_view fs) noexcept {
return AllocatedPath(fs);
}
gcc_pure
static AllocatedPath FromFS(const_pointer _begin,
const_pointer _end) noexcept {
return AllocatedPath(_begin, _end);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment