cxx icon indicating copy to clipboard operation
cxx copied to clipboard

WIP: Allow for Clone bound on extern Rust type + Box clone

Open capickett opened this issue 4 years ago • 1 comments

Fixes #105.

First, extends the parsing syntax to allow for Clone bounds added to an extern Rust type. Then, introduces a public Box clone() const noexcept; member on Box<T> that will only be callable if T is declared as Cloneable. Finally, exposes a clone FFI function callable from C++ to clone the Box. These bindings are only generated if the type derives Clone or has a trait bound for Clone.

Tested with cargo test

Still todo:

  • [ ] Fix trybuilt test cases
  • [ ] Make sure the approach makes sense.
  • [ ] Extend documentation to describe the new behavior.

capickett avatar Jan 09 '21 23:01 capickett

Ominous #666

capickett avatar Jan 09 '21 23:01 capickett

Don't have time to pick this back up

capickett avatar Aug 25 '23 17:08 capickett