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


On Jul 27, 2004, at 9:04 AM, Benjamin Kosnik wrote:


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.

The only one of these comments I have a problem with is the last
one. I thought aboutusing VERIFY and deliberately decided against
it. Rationale: if I've got multiple failures I want to see them all. Using
VERIFY means I'll get an abort after the first failure.


But I'll fix the other problems you pointed out, and then check this
in in a couple days.

--Matt


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