From b13d8ec4295f25873260adb7fff2f8afea4e75f3 Mon Sep 17 00:00:00 2001 From: Neil Groves Date: Sun, 4 Apr 2010 19:19:58 +0000 Subject: [PATCH] Fix duplication of algorithms by delegating to the specific Boost.Range algorithm header files. This avoids pulling in any more names than necessary for maximum backward compatibility. Also the old algorithms that are not duplicated have been reinstated again to maximize backward compatibility. [SVN r61049] --- include/boost/detail/algorithm.hpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/include/boost/detail/algorithm.hpp b/include/boost/detail/algorithm.hpp index cfd9b40d..fd1a83ec 100644 --- a/include/boost/detail/algorithm.hpp +++ b/include/boost/detail/algorithm.hpp @@ -40,12 +40,32 @@ #include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace boost { + template + bool any_if(InputIterator first, InputIterator last, Predicate p) + { + return std::find_if(first, last, p) != last; + } + + template + bool any_if(const Container& c, Predicate p) + { + return any_if(begin(c), end(c), p); + } + template bool container_contains(InputIterator first, InputIterator last, T value) {