I'm trying to figure out how to move a MallocMessageBuilder. I thought that 
if I created a std::unique_ptr to it, then I could move that pointer, but 
it is failing at runtime because the rvalue constructor is deleted.

Am I doing something wrong with my move?

Pseudo-code:
void my_func(std::unique_ptr<::capnp::MallocMessageBuilder> builder) {
  my_class.builder = std::move(builder);
}
auto builder = std::unique_ptr<::capnp::MallocMessageBuilder>();
// ... initialize the builder ...
my_func(std::move(builder));

Is there a way to move a MallocMessageBuilder without just using a raw 
pointer? It fails at runtime in the std::move call in my function.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to