Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1313

Comment by HolyBlackCat on Can someone explain the rules of object lifetimes and uninitialized memory in C++ (context: `std::inplace_vector`)?

$
0
0
You need to start lifetimes of individual array elements using placement-new (when resizing the vector), and destroy them when the vector dies (by manually calling the destructor).

Viewing all articles
Browse latest Browse all 1313

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>