aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-02-25 16:13:14 +0100
committerMax Kellermann <max@duempel.org>2015-02-25 19:53:35 +0100
commit81c49fba031ba9071817e7e563c006ea637330b7 (patch)
tree178eca775841b082f179b786f0413c5ee1ce57e9
parenteb174d5ba317743ca21295697df90a7ed66a64bb (diff)
downloadmpd-81c49fba031ba9071817e7e563c006ea637330b7.tar.gz
mpd-81c49fba031ba9071817e7e563c006ea637330b7.tar.xz
mpd-81c49fba031ba9071817e7e563c006ea637330b7.zip
fs/AllocatedPath: add nullptr_t constructor
-rw-r--r--src/fs/AllocatedPath.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fs/AllocatedPath.hxx b/src/fs/AllocatedPath.hxx
index 9ec7be6b0..c90a2aec4 100644
--- a/src/fs/AllocatedPath.hxx
+++ b/src/fs/AllocatedPath.hxx
@@ -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