stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Pevtsov <ant...@moscow.vdiweb.com>
Subject Re: Re: test for lib.string.swap
Date Wed, 17 May 2006 15:20:47 GMT
Martin, I updated all tests to use new macro DEFINE_STRING_TEST_DISPATCH
and allocator.
The diff file is here:
http://people.apache.org/~antonp/stdcxx05172006/

Martin Sebor wrote:

> <>PS I noticed that the --no-xxx/--enable-xxx command line options don't

> <>quite control the overloads they should. I haven't looked into it very
> closely yet except for adding a missing "-enable-xxx" > string. Are you
> seeing the same thing on your end?
>

Yes. The cause is the missed option "-no-self-ref". The diff file with
fix attached.

I have a question about UserAlloc: how can I instantiate two different
allocators (i.e. allocators which have different ids)? It looks like
all allocators in the same scope will have the same id.

Thanks,
Anton Pevtsov

> <>-----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com]
> Sent: Wednesday, May 17, 2006 07:26
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: test for lib.string.swap
>
>
> Anton Pevtsov wrote:

>> Martin, I added several test cases to verify the swap with temporary 
>> string and committed the test: 
>> http://svn.apache.org/viewcvs?rev=406940&view=rev
>  
>

Great, thanks!


>> 
>> I plan to enhance the test to exercise the function with unequal 
>> allocators.
>  
>

Okay. I've done some work on the user-defined allocator support but I'm
not there yet. I would like to simplify the checking of the allocator
(and traits) member function calls (as well as the throwing of
exceptions) and avoid the conditional logic in all the tests but I need
to think about it some more.

Btw., I changed UserAlloc to invoke the operator_new() helper function
instead of (the replaceable) operator new() so that we can
unconditionally (i.e., on all platforms) take advantage of the memory
leak detection and exception throwing features. That also still needs a
bit of work. I've started modifying the replace test as a starting
point.

Martin

PS I noticed that the --no-xxx/--enable-xxx command line options don't
quite control the overloads they should. I haven't looked into it very
closely yet except for adding a missing "-enable-xxx" string. Are you
seeing the same thing on your end?

PPS I realize that there will likely be some overlap or conflicts
between what you've been working on and my today's changes. I hope
they're not too difficult to resolve.


Mime
View raw message