summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c++/codec-json/json.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/c++/codec-json/json.h b/c++/codec-json/json.h
index 1fe6bb5..56cadc0 100644
--- a/c++/codec-json/json.h
+++ b/c++/codec-json/json.h
@@ -20,6 +20,10 @@ public:
data(std::size_t ring_size_):buffer_{ring_size_}{}
+ data(ring_buffer buff_):
+ buffer_{std::move(buff_)}
+ {}
+
data(const std::string_view& view__):
buffer_{view__.size()}
{