https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70966
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Wed Jun 20 19:34:53 2018 New Revision: 261818 URL: https://gcc.gnu.org/viewcvs?rev=261818&root=gcc&view=rev Log: PR libstdc++/70966 make pmr::new_delete_resource() immortal Construct the program-wide resource objects using placement new. This means they have dynamic storage duration and won't be destroyed during termination. PR libstdc++/70966 * include/experimental/memory_resource (__resource_adaptor_imp): Add static assertions to enforce requirements on pointer types. (__resource_adaptor_imp::get_allocator()): Add noexcept. (new_delete_resource, null_memory_resource): Return address of an object with dynamic storage duration. (__null_memory_resource): Remove. * testsuite/experimental/memory_resource/70966.cc: New. Added: trunk/libstdc++-v3/testsuite/experimental/memory_resource/70966.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/experimental/memory_resource