help wanted
仓库指标
- 星标
- (4,472 个星标)
- PR 合并指标
- (平均合并 8分钟) (30 天内合并 3 个 PR)
描述
We should provide a way to constrain that some opaque Rust type implements Clone and then expose the Clone impl to C++ via a clone() member function on rust::Box.
Something like:
mod ffi {
extern "Rust" {
type ClonableR: Clone;
}
extern "C++" {
fn f(b: Box<ClonableR>); // C++ will be able to clone b
}
}
template <typename T>
class Box {
+ Box clone() const noexcept;
};