Avoid Boost.Bind deprecation warning

This commit is contained in:
Alexander Grund 2020-07-12 18:01:12 +02:00
parent c2617ba360
commit 91b738da27
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
2 changed files with 12 additions and 5 deletions

View file

@ -17,7 +17,9 @@
#pragma warning( pop )
#endif
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/bind/placeholders.hpp>
#include <boost/version.hpp>
#include <functional>
namespace
@ -73,9 +75,14 @@ BOOST_AUTO_TEST_CASE( std_bind_first_is_functor )
BOOST_AUTO_TEST_CASE( bind_is_functor )
{
{
#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 ) );

View file

@ -23,7 +23,7 @@
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
#endif
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <functional>
#include <vector>
#include <deque>