[PATCH] D16970: scoped alloc construct: adds basic tests

Masud Rahman via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 7 10:56:28 PST 2016


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

This commit introduces a new supporting allocator 'IA1' in
'support/instrumentingallocators.h' which tracks allocations and deallocations.

This commit also introduces a new test driver 'construct.pass.cpp' which tests
using the 'scoped_allocator_adaptor' with three types which take allocators in
different ways:

    1. container-style with the allocator at the end
    2. std::function-style with the allocator at the start
    3. allocator-unaware types

This will provide a starting point for scenarios where argument lists need to
be adapted before being forwarded for 'pair<T1, T2>' where 'T1' and 'T2' may be
combinations of the above three classes of types.

http://reviews.llvm.org/D16970

Files:
  test/std/utilities/allocator.adaptor/scoped.adaptor.operators/construct.pass.cpp
  test/support/instrumentingallocators.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16970.47140.patch
Type: text/x-patch
Size: 4903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160207/00f967a2/attachment-0001.bin>


More information about the cfe-commits mailing list