This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/70940] pmr::resource_adaptor requires optional allocator requirements and incorrectly aligns returned pointers.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70940

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed May  4 12:08:45 2016
New Revision: 235868

URL: https://gcc.gnu.org/viewcvs?rev=235868&root=gcc&view=rev
Log:
libstdc++/70940 Start fixing polymorphic memory resources

        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:
    trunk/libstdc++-v3/testsuite/experimental/memory_resource/
    trunk/libstdc++-v3/testsuite/experimental/memory_resource/1.cc
      - copied, changed from r235859,
trunk/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc
   
trunk/libstdc++-v3/testsuite/experimental/memory_resource/null_memory_resource.cc
      - copied, changed from r235859,
trunk/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc
   
trunk/libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc
Removed:
    trunk/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc
    trunk/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/experimental/memory_resource

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]