Add construction and assignment for rust::Vec
diff --git a/src/cxx.cc b/src/cxx.cc
index 63b2166..7465f56 100644
--- a/src/cxx.cc
+++ b/src/cxx.cc
@@ -237,6 +237,8 @@
}
#define RUST_VEC_EXTERNS(RUST_TYPE, CXX_TYPE) \
+ void cxxbridge02$rust_vec$##RUST_TYPE##$new( \
+ rust::Vec<CXX_TYPE> *ptr) noexcept; \
void cxxbridge02$rust_vec$##RUST_TYPE##$drop( \
rust::Vec<CXX_TYPE> *ptr) noexcept; \
size_t cxxbridge02$rust_vec$##RUST_TYPE##$len( \
@@ -247,6 +249,10 @@
#define RUST_VEC_OPS(RUST_TYPE, CXX_TYPE) \
template <> \
+ rust::Vec<CXX_TYPE>::Vec() noexcept { \
+ cxxbridge02$rust_vec$##RUST_TYPE##$new(this); \
+ } \
+ template <> \
void rust::Vec<CXX_TYPE>::drop() noexcept { \
return cxxbridge02$rust_vec$##RUST_TYPE##$drop(this); \
} \