4 ms·
I assume it’s been around forever. https://en.cppreference.com/w/cpp/language/new https://en.cppreference.com/w/cpp/language/new (Placement-new is the thing you
by BenFrantzDale 4y ago
I assume it’s been around forever. https://en.cppreference.com/w/cpp/language/new https://en.cppreference.com/w/cpp/language/new (Placement-new is the thing you are talking about.) C++20 has `std::construct_at` which does the same thing but is usable at compile time (in a `constexpr` context) https://en.cppreference.com/w/cpp/memory/construct_at https://en.cppreference.com/w/cpp/memory/construct_at
- gpderetta 4y agoTIL about std::construct_at, thanks! edit: not sure why they didn't just bless placement new with constexpr powers though.