diff --git a/include/boost/algorithm/gather.hpp b/include/boost/algorithm/gather.hpp index 7a0fdf2..e777f8b 100644 --- a/include/boost/algorithm/gather.hpp +++ b/include/boost/algorithm/gather.hpp @@ -22,9 +22,10 @@ #include // for std::stable_partition #include +#include // for std::make_pair #include -#include // for boost::bind +#include // for boost::bind #include // for boost::begin(range) #include // for boost::end(range) @@ -81,13 +82,14 @@ namespace boost { namespace algorithm { */ template < - typename BidirectionalIterator, // Iter models BidirectionalIterator - typename Pred> // Pred models UnaryPredicate + typename BidirectionalIterator, // models BidirectionalIterator + typename Pred> // models UnaryPredicate std::pair gather ( BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Pred pred ) { // The first call partitions everything up to (but not including) the pivot element, // while the second call partitions the rest of the sequence. + using namespace boost::placeholders; return std::make_pair ( std::stable_partition ( first, pivot, !boost::bind ( pred, _1 )), std::stable_partition ( pivot, last, boost::bind ( pred, _1 ))); diff --git a/string/example/predicate_example.cpp b/string/example/predicate_example.cpp index 473ab8b..26d24e4 100644 --- a/string/example/predicate_example.cpp +++ b/string/example/predicate_example.cpp @@ -12,8 +12,6 @@ #include #include #include -#include - using namespace std; using namespace boost;