Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Superb! Looking through https://en.cppreference.com/w/cpp/memory/start_lifetime_as, this appears to be the right thing. It also has volatile overloads (which it looks like placement new still does not). This doesn't appear to be implemented in libc++ yet but that seems fixable, it'll go down the same object construction logic placement new does. Thank you for the reference, that'll fix some ugly edge cases in one of my libraries.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: