删除重复定义的算法find
This commit is contained in:
@@ -41,16 +41,6 @@ namespace TinySTL{
|
|||||||
memset(first, static_cast<unsigned char>(value), n * sizeof(wchar_t));
|
memset(first, static_cast<unsigned char>(value), n * sizeof(wchar_t));
|
||||||
return first + n;
|
return first + n;
|
||||||
}
|
}
|
||||||
//************ [find] ****************
|
|
||||||
//********* [Algorithm Complexity: O(N)] ****************
|
|
||||||
template<class InputIterator, class T>
|
|
||||||
InputIterator find(InputIterator first, InputIterator last, const T& val){
|
|
||||||
for (; first != last; ++first){
|
|
||||||
if (*first == val)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return first;
|
|
||||||
}
|
|
||||||
//*********** [min] ********************
|
//*********** [min] ********************
|
||||||
//********* [Algorithm Complexity: O(1)] ****************
|
//********* [Algorithm Complexity: O(1)] ****************
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|||||||
Reference in New Issue
Block a user