There are two almost identical algorithms in STL:
https://en.cppreference.com/w/cpp/memory/uninitialized_default_construct https://en.cppreference.com/w/cpp/memory/un