| 1 |
#ifndef ALGORITHM_HPP |
| 2 |
#define ALGORITHM_HPP |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
namespace A_LIB_NAMESPACE{ |
| 7 |
|
| 8 |
template<typename _Iterator1, typename _Iterator2, typename _Tvalue> |
| 9 |
_Iterator2 match_array(_Iterator1 begin_match, _Iterator1 end_match, |
| 10 |
_Iterator2 begin_resu, _Iterator2 end_resu, _Tvalue val){ |
| 11 |
do{ |
| 12 |
if(*begin_match == val) |
| 13 |
return begin_resu; |
| 14 |
|
| 15 |
begin_match++; |
| 16 |
begin_resu++; |
| 17 |
}while( begin_match < end_match && begin_resu < end_resu); |
| 18 |
return end_resu; |
| 19 |
} |
| 20 |
|
| 21 |
} |
| 22 |
|
| 23 |
#endif // ALGORITHM_HPP |