constexpr Dynamic Memory Allocation, C++20
constexpr has become a major feature for compile-time programming in C++. Introduced in a simple form in C++11 evolved into almost another “sub-language”, an alternative to regular template code. In C++20 you can even use std::vector and std::string in constexpr context! In this article, I’d like to discuss constexpr memory allocations, a building block for std::vector.