stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: test for lib.alg.generate
Date Thu, 08 Dec 2005 18:06:55 GMT
Anton Pevtsov wrote:
> The attached file contains my attempt to update this test and port it to
> new test driver.
> Here I implemented special class to be used as Size (some integral type)
> in the generate_n algorithm. I plan to update the lib.alg.fill test
> in the same way.

Thanks. I tightened up the class to strictly match the requirement
in 25.2.6, p2 (i.e., Size need not have operator-- defined or be
modifiable). That exposed an incorrect assumption in the algorithm
(see After fixing
it I was able to compile and run the test.

You will need to keep this in mind when changing the fill.cpp test
(I already fixed the same bug in std::fill_n() -- see: And since with
this enhancement the class is going to used in 2 tests (and,
eventually, also in the search.cpp test) you might want to move
it to the alg_test.h header.

I also changed the Generator class so as not to modify the subject
sequence (that's not really allowed).

Finally, I simplified the way the test initializes the elements in
the subject sequence.

With these changes I committed the test to SVN here:


View raw message