[PATCH] D16967: support/allocators: implements requirements

Masud Rahman via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 7 09:17:07 PST 2016


frutiger created this revision.
frutiger added reviewers: mclow.lists, EricWF.
frutiger added a subscriber: cfe-commits.

This commit adds the required constructor overloads and member functions to
make the supporting allocators actually valid allocators.  The implementation
of 'allocate' defers to 'std::malloc', and correspondingly that of 'deallocate'
defers to 'std::free'.

This commit also changes supporting allocators 'A1' to track the number of
elements requested and 'A2' to track the hint that was requested in order to
facilitate testing.

Two (seemingly unrelated) tests seem to fail:

Failing Tests (2):
    libc++ :: std/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp
    libc++ :: std/utilities/tuple/tuple.tuple/tuple.creation/tuple_cat.pass.cpp

http://reviews.llvm.org/D16967

Files:
  test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size.pass.cpp
  test/std/utilities/allocator.adaptor/allocator.adaptor.members/allocate_size_hint.pass.cpp
  test/std/utilities/allocator.adaptor/allocator.adaptor.members/deallocate.pass.cpp
  test/support/allocators.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16967.47136.patch
Type: text/x-patch
Size: 8697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160207/ce0b95c0/attachment-0001.bin>


More information about the cfe-commits mailing list