diff --git a/test/algorithm/count_if.cpp b/test/algorithm/count_if.cpp index fa686fc2..1a8c02e5 100644 --- a/test/algorithm/count_if.cpp +++ b/test/algorithm/count_if.cpp @@ -11,6 +11,7 @@ #include #include #include +#include int main() @@ -27,8 +28,9 @@ main() { typedef boost::mpl::vector_c mpl_vec; - BOOST_TEST(boost::fusion::count_if(mpl_vec(), boost::lambda::_1 <= 2) == 2); - BOOST_TEST(boost::fusion::count_if(mpl_vec(), boost::lambda::_1 > 2) == 1); + // Cannot use lambda here as mpl iterators return rvalues and lambda needs lvalues + BOOST_TEST(boost::fusion::count_if(mpl_vec(), std::bind2nd(std::less_equal(), 2)) == 2); + BOOST_TEST(boost::fusion::count_if(mpl_vec(), std::bind2nd(std::greater(), 2)) == 1); } return boost::report_errors();