mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
798 stars 44 forks source link

Force the presence of the unsafe keyword in the cpp_class macro #33

Closed ogoffart closed 6 years ago

ogoffart commented 6 years ago

using cpp_class! can actually be unsafe if the C++ class invoke undefined behavior in its constructor or destructor, or if it is not relocatable, it is better if there is the unsafe keyword there.