21 Jun
2020
21 Jun
'20
6:01 p.m.
On Sun, Jun 21, 2020 at 8:54 AM Ville Voutilainen
a memory_resource doesn't provide hooks for deciding how it propagates, so you'll be nailing that question down to one answer. It sure looks to me that there's more than one answer to that question.
A benefit of targeting Boost is that a library can experiment with making such decisions without etching it in stone (as would happen if it was a Standard C++ component). For example as I have done with Boost.JSON, which provides a novel "storage_ptr": a smart pointer container to a reference-counted memory_resource, and has some opinions on exactly how it is propagated to children: http://vinniefalco.github.io/doc/json/json/usage/allocators.html Thanks