fs/AllocatedPath: add FromFS() with pointer range
This commit is contained in:
parent
11ea72e240
commit
7530770842
|
@ -48,6 +48,9 @@ class AllocatedPath {
|
|||
AllocatedPath(std::nullptr_t):value() {}
|
||||
explicit AllocatedPath(const_pointer_type _value):value(_value) {}
|
||||
|
||||
AllocatedPath(const_pointer_type _begin, const_pointer_type _end)
|
||||
:value(_begin, _end) {}
|
||||
|
||||
AllocatedPath(string &&_value):value(std::move(_value)) {}
|
||||
|
||||
static AllocatedPath Build(const_pointer_type a, size_t a_size,
|
||||
|
@ -132,6 +135,12 @@ public:
|
|||
return AllocatedPath(fs);
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
static AllocatedPath FromFS(const_pointer_type _begin,
|
||||
const_pointer_type _end) {
|
||||
return AllocatedPath(_begin, _end);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a C++ string that is already in the filesystem
|
||||
* character set to a #Path instance.
|
||||
|
|
Loading…
Reference in New Issue