incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: test for lib.set.intersection
Date Fri, 17 Feb 2006 16:17:08 GMT
Anton Pevtsov wrote:
> The attached file contains the test for the lib.set.intersection
> algorithm.

Thank you. Committed thus:

> struct SetIntersectionTestBase
> {
>     virtual ~SetIntersectionTestBase() {}
>     const char* iter_names [3];
>     // invokes set_intersection
>     virtual X*
>     set_intersection (const X*, const X*, const X*, const X*, 
>                       X*, X*, const Less*) const {
>         RW_ASSERT (!"test logic error");

FYI: there is no need to provide a definition for a virtual function
in the base class as long as it is overridden in the base class. In
cases when the function must be overridden it's better to make it
pure virtual. (The reason 25.merge.cpp does define the virtual
functions in the base rather than make them pure is because each
derived class overrides only one of the two functions; the one that
is not overridden is not called on the object that doesn't override


View raw message