stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: test for lib.accumulate
Date Wed, 22 Feb 2006 02:27:20 GMT
Anton Pevtsov wrote:
> The attached file contains the test for the lib.accumulate algorithm.
> Here I implemented new class Y derived from X and add the += operator
> into it.

Looks good, thanks. I just made a few minor changes to it, such
as replacing the tricky operator new business with a straight
(but still dynamically allocated) array, and the _RWSTD_SIZE_T
macro with the std::size_t type. The macro is used in library
and test suite headers to prevent namespace pollution, but there
is no need for it here.

Committed thus:
http://svn.apache.org/viewcvs?rev=379649&view=rev

Btw., it would be good to reduce the amount of templates in the
new tests like we recently started doing. It really does make
a difference in the compilation time.


> May be, it would be useful to extend this class with operator *
> (for the inner_product testing) and move it to alg_base header.

Yeah, I think that may not be a bad idea. Let me look into it some.

> Also, it
> would be useful to have "primitive" templates with += and *= operators
> (as an analogue of assign<>).
> Martin, what do you think about it?

Yes, if there's a need for such things in other tests it would make
sense to move them to a common header. We already need to do that
with the Less functor that's duplicated in many tests.

Martin

Mime
View raw message