This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: PATCH: use construct and destroy from user-provided allocators


I agree with Gaby, this looks great.

The testcases, however, might be improved by putting the check function
into testsuite_allocator.h: we try to avoid code duplication as much as
possible by moving test framework bits into the testsuite includes, as
inconceivable as it may seem. (And maybe name this common function
something more descriptive, like check_construct_destroy or whatever.)
You might want to consider naming the test files after whatever the
final function name is, instead of allocator1.cc. In addition, usually
we try to return zero from main, and use VERIFY or assert() to check
correctness. 

One of the new tests fails for me on x86/linux, ext/hash_allocator1.cc.

These are minor comments: please feel free to check in when you feel
ready without reposting.

best,
benjamin


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