2022-09-30 11:49:03 +00:00
|
|
|
#ifndef _RSTL_ALGORITHM_HPP
|
|
|
|
#define _RSTL_ALGORITHM_HPP
|
2022-08-13 12:57:38 +00:00
|
|
|
|
2022-09-18 05:55:13 +00:00
|
|
|
#include "rstl/pointer_iterator.hpp"
|
|
|
|
|
2022-08-13 12:57:38 +00:00
|
|
|
namespace rstl {
|
2022-09-18 05:55:13 +00:00
|
|
|
template < class Iter, class T >
|
|
|
|
inline Iter find(Iter first, Iter last, const T& val) {
|
|
|
|
while (first != last && !(*first == val))
|
|
|
|
++first;
|
|
|
|
return first;
|
2022-08-13 12:57:38 +00:00
|
|
|
}
|
2022-09-18 05:55:13 +00:00
|
|
|
} // namespace rstl
|
2022-09-30 11:49:03 +00:00
|
|
|
#endif // _RSTL_ALGORITHM_HPP
|