summaryrefslogtreecommitdiff
path: root/src/shared_string.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared_string.hh')
-rw-r--r--src/shared_string.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared_string.hh b/src/shared_string.hh
index 50eec956..982cb67f 100644
--- a/src/shared_string.hh
+++ b/src/shared_string.hh
@@ -24,6 +24,9 @@ public:
StringView::operator=(*m_storage);
}
}
+ struct NoCopy{};
+ SharedString(StringView str, NoCopy) : StringView(str) {}
+
SharedString(const char* str) : SharedString(StringView{str}) {}
SharedString acquire_substr(ByteCount from, ByteCount length = INT_MAX) const