summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/leveldb/include/leveldb/slice.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/leveldb/include/leveldb/slice.h b/lib/leveldb/include/leveldb/slice.h
index 37cb8217..93438705 100644
--- a/lib/leveldb/include/leveldb/slice.h
+++ b/lib/leveldb/include/leveldb/slice.h
@@ -35,6 +35,9 @@ class LEVELDB_EXPORT Slice {
// Create a slice that refers to the contents of "s"
Slice(const std::string& s) : data_(s.data()), size_(s.size()) {}
+ // Create a slice that refers to the contents of "s"
+ Slice(std::string_view s) : data_(s.data()), size_(s.size()) {}
+
// Create a slice that refers to s[0,strlen(s)-1]
Slice(const char* s) : data_(s), size_(strlen(s)) {}