Commit ea739145 authored by Rosen Matev's avatar Rosen Matev 🌲
Browse files

Merge branch 'rm-fix-Boost-bind-2' into 'master'

Add more Boost.bind fixes (follow up !1014)

See merge request !1016
parents ce356a1a 9aa16545
Pipeline #3278019 passed with stage
in 25 seconds
......@@ -24,7 +24,7 @@
# include <string>
# include <vector>
# include <boost/bind.hpp>
# include <boost/bind/bind.hpp>
# include <boost/function.hpp>
# include <boost/utility/enable_if.hpp>
......@@ -110,6 +110,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<1 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1 );
}
......@@ -117,6 +118,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<2 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2 );
}
......@@ -124,6 +126,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<3 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2, _3 );
}
......@@ -131,6 +134,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<4 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2, _3, _4 );
}
......@@ -138,6 +142,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<5 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2, _3, _4, _5 );
}
......@@ -145,6 +150,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<6 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2, _3, _4, _5, _6 );
}
......@@ -152,6 +158,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<7 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2, _3, _4, _5, _6, _7 );
}
......@@ -159,6 +166,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<8 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2, _3, _4, _5, _6, _7, _8 );
}
......@@ -166,6 +174,7 @@ namespace MultiplePersonalityCallHelpers {
template <class R, class T1, class T2>
typename boost::enable_if_c<9 == R::arity, R&>::type safe_ptr_to_memfn_binder( R& dst, T1* inst, T2 mfnptr ) {
using namespace boost;
using namespace boost::placeholders;
return dst = bind( mfnptr, inst, _1, _2, _3, _4, _5, _6, _7, _8, _9 );
}
} // namespace MultiplePersonalityCallHelpers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment