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 http://issues.apache.org/jira/browse/STDCXX-83). 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:
http://issues.apache.org/jira/browse/STDCXX-84). 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:
http://svn.apache.org/viewcvs.cgi?rev=354939&view=rev

Martin

Reply via email to