mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-12-22 21:35:45 +01:00
c,cpp: add msgpack_vrefbuffer_migrate, msgpack::vrefbuffer::migrate
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user