Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions include/boost/algorithm/cxx11/any_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ using std::any_of; // Section 25.2.2
template<typename InputIterator, typename Predicate>
bool any_of ( InputIterator first, InputIterator last, Predicate p )
{
for ( ; first != last; ++first )
if ( p(*first))
return true;
return false;
return std::find_if(first, last, p) != last;
}
#endif

Expand Down Expand Up @@ -66,10 +63,7 @@ bool any_of ( const Range &r, Predicate p )
template<typename InputIterator, typename V>
bool any_of_equal ( InputIterator first, InputIterator last, const V &val )
{
for ( ; first != last; ++first )
if ( val == *first )
return true;
return false;
return std::find(first, last, val) != last;
}

/// \fn any_of_equal ( const Range &r, const V &val )
Expand Down