fs/AllocatedPath: add nullptr_t constructor

This commit is contained in:
Max Kellermann 2015-02-25 16:13:14 +01:00
parent eb174d5ba3
commit 81c49fba03
1 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,7 @@
#include "Traits.hxx"
#include "Path.hxx"
#include <cstddef>
#include <utility>
#include <string>
@ -44,6 +45,7 @@ class AllocatedPath {
string value;
AllocatedPath(std::nullptr_t):value() {}
AllocatedPath(const_pointer _value):value(_value) {}
AllocatedPath(string &&_value):value(std::move(_value)) {}
@ -75,7 +77,7 @@ public:
*/
gcc_const
static AllocatedPath Null() {
return AllocatedPath("");
return AllocatedPath(nullptr);
}
gcc_pure