KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is the following legal C++ with well-defined behaviour? class my_class { ... }; int main() { char storage[sizeof(my_class)]; new ((void *)storage) my_class(); } Or is this problematic because of pointer casting/alignment considerations?
Tags (comma-separated)
Save Edits
Cancel