Hi Jonathan, > PR libstdc++/70940 > * include/experimental/memory_resource (__resource_adaptor_common): > New base class. > (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned > pointer from unaligned, and vice versa. > (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust > allocated pointer to meet alignment request. > (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve > original pointer for deallocation. > (__resource_adaptor_imp::do_is_equal): Reformat. > (__resource_adaptor_imp::_S_aligned_size): Remove. > (__resource_adaptor_imp::_S_supported): Remove. > (new_delete_resource): Use __gnu_cxx::new_allocator. > * testsuite/experimental/memory_resource/resource_adaptor.cc: Test > extended alignments and use debug_allocator to check for matching > allocate/deallocate pairs. > > Tested x86_64-linux, committed to trunk. This is more experimental TS > material, so I'll probably backport it.
this patch has cause a couple of FAILures on 32-bit targets/multilibs. I'm seeing it on i386-pc-solaris2.11 and sparc-sun-solaris2.11, with gcc-testresults postings to the same effect for i586-unknown-freebsd10.4, i686-pc-linux-gnu, s390x-ibm-linux-gnu, x86_64-pc-linux-gnu: +FAIL: experimental/memory_resource/1.cc (test for excess errors) +FAIL: experimental/memory_resource/70966.cc (test for excess errors) +FAIL: experimental/memory_resource/null_memory_resource.cc (test for excess errors) +FAIL: experimental/memory_resource/resource_adaptor.cc (test for excess errors) +XPASS: experimental/memory_resource/resource_adaptor.cc execution test +FAIL: experimental/type_erased_allocator/2.cc (test for excess errors) FAIL: experimental/type_erased_allocator/2.cc (test for excess errors) Excess errors: /var/gcc/regression/trunk/11.4-gcc/build/i386-pc-solaris2.11/libstdc++-v3/include/experimental/memory_resource:329: warning: left shift count >= width of type [-Wshift-count-overflow] Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University