This is a complete but partly silly implementation of C++17 <memory_resource>.
Preliminary pieces of this patch are already filed as D46806 and D46807. If those get merged I'll rebase this one. I myself do not have commit privileges.
Potential issues with this patch:
- monotonic_buffer_resource is complete and IMHO well tested, but I bet someone can find suboptimal things in its design.
- unsynchronized_pool_resource is trivial; it ignores the pool_options and just passes everything through to the upstream, which is conforming but I'm sure someone has a better idea.
- unsynchronized_pool_resource is "code complete" but untested.
I feel guilty about (3) and will fix it eventually. I'm willing to take a stab at (2) if anyone can explain in English what the _intended_ implementation is. On (1) I hope there will be only easy nits.
https://github.com/Quuxplusone/libcxx/compare/master...memory-resource-header
Okay, I can roll with that. I'll create a new patch that modifies <experimental/memory_resource>'s uses-allocator parts per LWG2969 (and my followup DR), without any other diffs.
Should <experimental/memory_resource> continue caring about std::experimental::erased_type, which was in LFTS and LFTSv2 but did not make it into C++17? My kneejerk reaction is "yes". (And at the end of this process, when we copy <experimental/memory_resource> into <memory_resource>, should <memory_resource> care about erased_type? My kneejerk reaction is "no".)