summaryrefslogtreecommitdiff
path: root/cpp/vrefbuffer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/vrefbuffer.hpp')
-rw-r--r--cpp/vrefbuffer.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/vrefbuffer.hpp b/cpp/vrefbuffer.hpp
index 549d77f..c8eca7b 100644
--- a/cpp/vrefbuffer.hpp
+++ b/cpp/vrefbuffer.hpp
@@ -71,6 +71,13 @@ public:
return msgpack_vrefbuffer_veclen(this);
}
+ void migrate(vrefbuffer* to)
+ {
+ if(msgpack_vrefbuffer_migrate(this, to) < 0) {
+ throw std::bad_alloc();
+ }
+ }
+
private:
typedef msgpack_vrefbuffer base;