This is an archive of the discontinued LLVM Phabricator instance.

Implement <memory_resource> as a copy of <experimental/memory_resource>.
AbandonedPublic

Authored by Quuxplusone on May 24 2018, 11:49 PM.

Details

Summary

Depends on D46806 D47109 D47344 D47111 D47358

Even with all the above prep work to make <experimental/memory_resource> look just like <memory_resource>, this is still a huge diff.

Diff Detail

Repository
rCXX libc++

Event Timeline

Quuxplusone planned changes to this revision.Jun 5 2018, 9:44 PM

Once the dependencies (D47111 and D47358) are merged, I need to update the unit tests in this patch to reflect the unit tests that were committed. Right now, the unit tests in this patch reflect an old, out-of-date snapshot of what had been in those patches a couple weeks ago.

include/__memory_resource_base
54

This should be #include <__tuple>

include/memory_resource
48

This line should be gone.

Clean some minor cruft from src/experimental/memory_resource.cpp. (This part is a separate git commit which I could pull-request if you want it separately.)

I wonder if memory_resource needs a key function for its vtable; consider the precedent of D27387. But out-of-lining a trivial destructor just to avoid -Wweak-vtables feels kind of awful.

Experimental and std differ in their implementation of options() because the latter needs to be compileable as -std=c++11 whereas the former gets to use -std=c++14.

Quuxplusone marked 2 inline comments as done.Jul 3 2018, 2:34 AM

Rebased on master. Added to <version> by updating and running the Python script.

Rebased on master.

The previous patch had replaced test/support/test_memory_resource.hpp with the two files test/support/test_experimental_memory_resource.hpp and test/support/test_memory_resource.hpp (and edited all the experimental tests to use the former).

This new patch replaces test/support/test_memory_resource.h with the two files test/support/test_memory_resource.h and test/support/test_std_memory_resource.h (which reduces the diff by leaving the experimental tests untouched in this patch).

Oops, fix one last include of an ".hpp" support file which was recently renamed to ".h".

Quuxplusone abandoned this revision.Nov 2 2020, 3:33 PM

Superseded by D89057.