My Project
stxxl::find
Author
Roman Dementiev (2006)

The semantics of the algorithm is equivalent to the STL std::find.

Prototype

template < typename ExtIterator, typename EqualityComparable >
ExtIterator find ( ExtIterator first,
ExtIterator last,
const EqualityComparable& value,
int_type nbuffers
)

Description

Requirements on types

Preconditions

[first, last) is a valid range.

Complexity

Example

typedef stxxl::VECTOR_GENERATOR<int>::result vector_type;
vector_type V;
// fill the vector ...
// find 7 in V
vector_type::iterator result = find(V.begin(), V.end(), 7);
if(result != V.end())
std::cout << "Found at position " << (result - V.begin()) << std::endl;
else
std::cout << "Not found" << std::endl;