1 post tagged #uses-allocator.
#uses-allocator
Put a pmr::string inside your own struct and it will allocate from the default resource unless the struct is allocator-aware: an allocator_type, an optional allocator argument in every constructor, and forwarding to members. This is uses-allocator construction, shown reaching a string nested in a pmr::vector. Episode 7 of the pmr series.
// We use Google Analytics to understand which posts get traction and how the wro.cpp community grows. Anonymised, no ads, and you can decline -- the site works either way.