forked from boostorg/algorithm
Remove these files from the libs/directory, and reenter them later in
the libs/algorithm/ subdir. --Herve' [SVN r23304]
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/minmax.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace std;
|
||||
list<int> L;
|
||||
generate_n(front_inserter(L), 1000, rand);
|
||||
|
||||
typedef list<int>::const_iterator iterator;
|
||||
pair< iterator, iterator > result = boost::minmax_element(L.begin(), L.end());
|
||||
|
||||
cout << "The smallest element is " << *(result.first) << endl;
|
||||
cout << "The largest element is " << *(result.second) << endl;
|
||||
|
||||
assert( result.first == std::min_element(L.begin(), L.end()) );
|
||||
assert( result.second == std::max_element(L.begin(), L.end()) );
|
||||
}
|
Reference in New Issue
Block a user