26 #ifndef FUTURE_ALGORITHM_HPP_
27 #define FUTURE_ALGORITHM_HPP_ 1
32 #if HAVE_STD_ALL_ANY_NONE_OF
42 #elif HAVE_BOOST_ALL_ANY_NONE_OF
43 #include <boost/algorithm/cxx11/all_of.hpp>
44 #include <boost/algorithm/cxx11/any_of.hpp>
45 #include <boost/algorithm/cxx11/none_of.hpp>
55 template<
class InputIt,
class UnaryPredicate >
56 bool all_of(InputIt first, InputIt last, UnaryPredicate p) {
57 for (; first != last; ++first) {
58 if (!p(*first))
return false;
63 template<
class InputIt,
class UnaryPredicate >
64 bool any_of(InputIt first, InputIt last, UnaryPredicate p) {
65 for (; first != last; ++first) {
66 if (p(*first))
return true;
71 template<
class InputIt,
class UnaryPredicate >
72 bool none_of(InputIt first, InputIt last, UnaryPredicate p) {
73 for (; first != last; ++first) {
74 if (p(*first))
return false;
bool any_of(InputIt first, InputIt last, UnaryPredicate p)
bool none_of(InputIt first, InputIt last, UnaryPredicate p)
bool all_of(InputIt first, InputIt last, UnaryPredicate p)