summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/data/memory.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/data/memory.h b/vespalib/src/vespa/vespalib/data/memory.h
index af4cf6d856b..a8a4760754a 100644
--- a/vespalib/src/vespa/vespalib/data/memory.h
+++ b/vespalib/src/vespa/vespalib/data/memory.h
@@ -18,6 +18,8 @@ struct Memory
Memory() : data(nullptr), size(0) {}
Memory(const char *d, size_t s) : data(d), size(s) {}
Memory(const char *str) : data(str), size(strlen(str)) {}
+ Memory(const std::string &str)
+ : data(str.data()), size(str.size()) {}
Memory(const vespalib::string &str)
: data(str.data()), size(str.size()) {}
Memory(const vespalib::stringref &str_ref)