Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC++custom allocatorsSingle-choice MCQ

Given this std::pmr code, what determines where the vector's elements are allocated?

std::array<std::byte, 1024> buf; std::pmr::monotonic_buffer_resource pool{buf.data(), buf.size()}; std::pmr::vector<int> v{&pool}; for (int i = 0; i < 100; ++i) v.push_back(i);