This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/70940] pmr::resource_adaptor requires optional allocator requirements and incorrectly aligns returned pointers.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Aug 2016 12:21:02 +0000
- Subject: [Bug libstdc++/70940] pmr::resource_adaptor requires optional allocator requirements and incorrectly aligns returned pointers.
- Auto-submitted: auto-generated
- References: <bug-70940-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70940
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Sat Aug 6 12:20:31 2016
New Revision: 239199
URL: https://gcc.gnu.org/viewcvs?rev=239199&root=gcc&view=rev
Log:
libstdc++/70940 Start fixing polymorphic memory resources
Backport from mainline
2016-05-04 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70940
* include/experimental/memory_resource
(__resource_adaptor_imp::do_allocate): Do not default-construct
rebound allocator.
(__resource_adaptor_imp::do_deallocate): Likewise. Use
allocator_traits to get pointer type.
(__null_memory_resource::do_allocate): Remove unused parameters.
(__null_memory_resource::do_deallocate): Likewise.
(__null_memory_resource::do_is_equal): Likewise. Add return statement.
* testsuite/experimental/type_erased_allocator/1.cc: Combine with ...
* testsuite/experimental/type_erased_allocator/1_neg.cc: This, and
move to ...
* testsuite/experimental/memory_resource/1.cc: Here.
* testsuite/experimental/memory_resource/null_memory_resource.cc: New.
* testsuite/experimental/memory_resource/resource_adaptor.cc: New.
Added:
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/memory_resource/
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/memory_resource/1.cc
- copied, changed from r239198,
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/memory_resource/null_memory_resource.cc
- copied, changed from r239198,
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc
Removed:
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc
branches/gcc-6-branch/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/experimental/memory_resource