|
Revision 127, 0.5 kB
(checked in by sergey_shandar, 1 year ago)
|
a lot
|
| Line | |
|---|
| 1 |
#ifndef CBEAR_BERLIOS_DE_RANGE_FIND_HPP_INCLUDED |
|---|
| 2 |
#define CBEAR_BERLIOS_DE_RANGE_FIND_HPP_INCLUDED |
|---|
| 3 |
|
|---|
| 4 |
#include <cbear.berlios.de/range/begin.hpp> |
|---|
| 5 |
#include <cbear.berlios.de/range/end.hpp> |
|---|
| 6 |
|
|---|
| 7 |
#include <algorithm> |
|---|
| 8 |
|
|---|
| 9 |
namespace cbear_berlios_de |
|---|
| 10 |
{ |
|---|
| 11 |
namespace range |
|---|
| 12 |
{ |
|---|
| 13 |
|
|---|
| 14 |
template<class R, class V> |
|---|
| 15 |
typename traits<R const>::iterator find(R const &r, V const &p) |
|---|
| 16 |
{ |
|---|
| 17 |
return ::std::find(begin(r), end(r), p); |
|---|
| 18 |
} |
|---|
| 19 |
|
|---|
| 20 |
template<class R, class V> |
|---|
| 21 |
typename traits<R>::iterator find(R &r, V const &p) |
|---|
| 22 |
{ |
|---|
| 23 |
return ::std::find(begin(r), end(r), p); |
|---|
| 24 |
} |
|---|
| 25 |
|
|---|
| 26 |
} |
|---|
| 27 |
} |
|---|
| 28 |
|
|---|
| 29 |
#endif |
|---|
| 30 |
|
|---|