From 81c49fba031ba9071817e7e563c006ea637330b7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 25 Feb 2015 16:13:14 +0100 Subject: fs/AllocatedPath: add nullptr_t constructor --- src/fs/AllocatedPath.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 #include #include @@ -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 -- cgit v1.2.3