You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question: If the size of types in C++ and Rust are different, the code might still compile, but it would be very unsafe. Is there a way to make the compiler throw an error when the sizes of C++ and Rust types do not match?
For example, with the following code, a Rust Foo struct could be directly transmuted into a C++ Foo.
I have a question: If the size of types in C++ and Rust are different, the code might still compile, but it would be very unsafe. Is there a way to make the compiler throw an error when the sizes of C++ and Rust types do not match?
For example, with the following code, a Rust Foo struct could be directly transmuted into a C++ Foo.
rust code:
c++ code:
The text was updated successfully, but these errors were encountered: