diff --git a/TinySTL/Algorithm.h b/TinySTL/Algorithm.h index 00859a6..ca5450b 100644 --- a/TinySTL/Algorithm.h +++ b/TinySTL/Algorithm.h @@ -197,6 +197,16 @@ namespace TinySTL{ } return false; } + //********** [none_of] ************************* + //********* [Algorithm Complexity: O(N)] **************** + template + bool none_of(InputIterator first, InputIterator last, UnaryPredicate pred){ + for (; first != last; ++first){ + if (pred(*first)) + return false; + } + return true; + } }