From 91b738da272233487f45cf1d216508d1b807d5ab Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 12 Jul 2020 18:01:12 +0200 Subject: [PATCH] Avoid Boost.Bind deprecation warning --- test/detail/test_is_functor.cpp | 15 +++++++++++---- test/test_log.cpp | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/test/detail/test_is_functor.cpp b/test/detail/test_is_functor.cpp index 9ab36b0..0b58b13 100644 --- a/test/detail/test_is_functor.cpp +++ b/test/detail/test_is_functor.cpp @@ -17,7 +17,9 @@ #pragma warning( pop ) #endif #include -#include +#include +#include +#include #include namespace @@ -73,9 +75,14 @@ BOOST_AUTO_TEST_CASE( std_bind_first_is_functor ) BOOST_AUTO_TEST_CASE( bind_is_functor ) { - is_functor( boost::bind( &f0 ) ); - is_functor( boost::bind( &f1, _1 ) ); - is_functor( boost::bind( &f2, "", _1 ) ); + { +#if BOOST_VERSION >= 106000 + using namespace boost::placeholders; +#endif + is_functor( boost::bind( &f0 ) ); + is_functor( boost::bind( &f1, _1 ) ); + is_functor( boost::bind( &f2, "", _1 ) ); + } is_functor( std::bind( &f0 ) ); is_functor( std::bind( &f1, std::placeholders::_1 ) ); is_functor( std::bind( &f2, "", std::placeholders::_1 ) ); diff --git a/test/test_log.cpp b/test/test_log.cpp index 141f9e2..12dc0df 100644 --- a/test/test_log.cpp +++ b/test/test_log.cpp @@ -23,7 +23,7 @@ #include #include #endif -#include +#include #include #include #include