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.find.first.of
Date Wed, 07 Dec 2005 02:52:31 GMT
Anton Pevtsov wrote:
> I have not found any test for the find_first_of algorithm. It was
> declared in 25.find.cpp but was not exercised anywhere. So I implemented
> this test - see it in the attached file, please.

Thanks! The test looks good to me. I committed it with this change:

> Here I implemented our own predicate which may be used instead of
> std::equal_to. I think it may be useful to update this predicate (if
> necessary) and use it in other tests instead of std::equal_to.

I agree that we should move the predicate to alg_test.h and use it in
all the other tests that need it. Unless you beat me to it and submit
a patch with this change I'll try to do it tomorrow.

The other enhancement is to exercise this algorithm (as well as other
similar ones) to use a class Y in addition to X which are distinct
from one another but which meet the EqualityComparable requirement.


View raw message