Skip to content

Commit aee2667

Browse files
TaWeiTustefanseefeld
authored andcommitted
Fix deprecated usage of <boost/bind.hpp>
Replace <boost/bind.hpp> with <boost/bind/bind.hpp> and use namespace boost::placeholders when necessary.
1 parent 209179f commit aee2667

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

include/boost/python/exception_translator.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# include <boost/python/detail/prefix.hpp>
99

10-
# include <boost/bind.hpp>
10+
# include <boost/bind/bind.hpp>
1111
# include <boost/bind/placeholders.hpp>
1212
# include <boost/type.hpp>
1313
# include <boost/python/detail/translate_exception.hpp>
@@ -18,6 +18,7 @@ namespace boost { namespace python {
1818
template <class ExceptionType, class Translate>
1919
void register_exception_translator(Translate translate, boost::type<ExceptionType>* = 0)
2020
{
21+
using namespace boost::placeholders;
2122
detail::register_exception_handler(
2223
boost::bind<bool>(detail::translate_exception<ExceptionType,Translate>(), _1, _2, translate)
2324
);

include/boost/python/iterator.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ works correctly. */
2222
# pragma warning(disable: 4180)
2323
# endif
2424

25-
# include <boost/bind.hpp>
25+
# include <boost/bind/bind.hpp>
2626
# include <boost/bind/protect.hpp>
2727

2828
namespace boost { namespace python {
@@ -40,6 +40,7 @@ namespace detail
4040
, Target&(*)()
4141
)
4242
{
43+
using namespace boost::placeholders;
4344
return objects::make_iterator_function<Target>(
4445
boost::protect(boost::bind(get_start, _1))
4546
, boost::protect(boost::bind(get_finish, _1))

src/object/function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <boost/python/detail/none.hpp>
2222
#include <boost/mpl/vector/vector10.hpp>
2323

24-
#include <boost/bind.hpp>
24+
#include <boost/bind/bind.hpp>
2525

2626
#include <algorithm>
2727
#include <cstring>

src/object/inheritance.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <boost/graph/adjacency_list.hpp>
1212
#include <boost/graph/reverse_graph.hpp>
1313
#include <boost/property_map/property_map.hpp>
14-
#include <boost/bind.hpp>
14+
#include <boost/bind/bind.hpp>
1515
#include <boost/integer_traits.hpp>
1616
#include <boost/tuple/tuple.hpp>
1717
#include <boost/tuple/tuple_comparison.hpp>
@@ -184,6 +184,7 @@ namespace
184184
// map a type to a position in the index
185185
inline type_index_t::iterator type_position(class_id type)
186186
{
187+
using namespace boost::placeholders;
187188
typedef index_entry entry;
188189

189190
return std::lower_bound(

src/object/iterator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <boost/python/object/iterator_core.hpp>
77
#include <boost/python/object/function_object.hpp>
8-
#include <boost/bind.hpp>
8+
#include <boost/bind/bind.hpp>
99
#include <boost/mpl/vector/vector10.hpp>
1010

1111
namespace boost { namespace python { namespace objects {

test/import_.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <boost/python.hpp>
77

88
#include <boost/detail/lightweight_test.hpp>
9-
#include <boost/bind.hpp>
9+
#include <boost/bind/bind.hpp>
1010
#include <iostream>
1111
#include <sstream>
1212

0 commit comments

Comments
 (0)