From 94a258d06c8997ba6e375badf0fdea9a218e66ed Mon Sep 17 00:00:00 2001 From: Piotr Sarna Date: Wed, 26 Aug 2020 09:35:53 +0200 Subject: [PATCH] cql3: allow moving data out of raw_value in order to be able to elide copying when transferring data from raw_value. --- cql3/values.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cql3/values.hh b/cql3/values.hh index 495f77d492..d9410520d0 100644 --- a/cql3/values.hh +++ b/cql3/values.hh @@ -169,6 +169,11 @@ public: const bytes& operator*() const { return std::get(_data); } + bytes&& extract_value() && { + auto b = std::get_if(&_data); + assert(b); + return std::move(*b); + } raw_value_view to_view() const; };