Boost C++ 库

...世界上最受推崇和设计精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu,《C++ 编码规范

头文件 <boost/algorithm/cxx11/any_of.hpp> - Boost C++ 函数库
PrevUpHomeNext

测试范围内的元素,以查看是否有任何元素匹配某个值或谓词。

Marshall Clow

namespace boost {
  namespace algorithm {
    template<typename InputIterator, typename Predicate> 
      BOOST_CXX14_CONSTEXPR bool 
      any_of(InputIterator, InputIterator, Predicate);
    template<typename Range, typename Predicate> 
      BOOST_CXX14_CONSTEXPR bool any_of(const Range &, Predicate);
    template<typename InputIterator, typename V> 
      BOOST_CXX14_CONSTEXPR bool 
      any_of_equal(InputIterator, InputIterator, const V &);
    template<typename Range, typename V> 
      BOOST_CXX14_CONSTEXPR bool any_of_equal(const Range &, const V &);
  }
}

PrevUpHomeNext