From 6d86fb3aaa96b3639f5c65f7cbf28afa66cba81a Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 28 Apr 2020 12:41:10 -0700 Subject: [PATCH] Change include of boost/bind.hpp -> boost/bind/bind.hpp. Thanks to Andrey for the suggested patch --- include/boost/algorithm/gather.hpp | 8 +++++--- string/example/predicate_example.cpp | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) 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;