template<class Container>
class Aleph::EqualToMethod< Container >
Equality test for containers.
template<class Container>
Test if elements of this
are exactly contained in another container.
This method serves for testing if two containers contain the same elements. First, the container sizes are tested for equality. If they have the same size, then the testing is done by traversing this
. Each seen element is searched in the another container with the method search()
. So the container r
must export the search()
method, which frequently is the case for containers oriented to fast retrieval.
- Warning
- On some container, concretely
DynList
, the size is computed, not retrieved. So take in account this fact.
- Parameters
-
[in] | r | container on which the searches will be performed. |
- Returns
true
if the container have the same size and all the elements of this
are present in r