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
Of course, it takes more than the quoted code to prove the point. The implementation of inplace_vector has to make sure that we really only put Ts in. This is easy to review, though.
https://github.com/bemanproject/inplace_vector/blob/main/include/beman/inplace_vector/inplace_vector.hpp#L364-L367
Suppose T is a user-defined type, wouldn't this reinterpret_cast result in an undefined behavior? A solution would be to use std::launder.
The text was updated successfully, but these errors were encountered: