prime/include/rstl/algorithm.hpp

15 lines
326 B
C++
Raw Normal View History

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