Commit 166de46f authored by Rosen Matev's avatar Rosen Matev 🌲
Browse files

Merge branch 'rm-fix-Boost-bind-run2' into 'run2-patches'

Remove deprecated use of Boost.bind (cherry pick !1014 + !1016)

See merge request !1015
parents 71876a97 d736dec1
Pipeline #3278022 passed with stage
in 1 minute and 20 seconds
......@@ -12,7 +12,7 @@
#define MICRODST_RELATIONSCLONERALG_H 1
// Include files
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/function.hpp>
// From MicroDST
#include "MicroDST/BindType2ClonerDef.h"
......@@ -54,8 +54,8 @@ namespace MicroDST {
, m_cloner( NULL )
, m_clonerType( DEFAULTS::clonerType )
, m_useOriginalFrom( false )
, m_tableCloner( boost::bind( &RelationsClonerAlg<TABLE>::cloneFrom, &( *this ), _1 ),
boost::bind( &RelationsClonerAlg<TABLE>::cloneTo, &( *this ), _1 ) ) {
, m_tableCloner( boost::bind( &RelationsClonerAlg<TABLE>::cloneFrom, &( *this ), boost::placeholders::_1 ),
boost::bind( &RelationsClonerAlg<TABLE>::cloneTo, &( *this ), boost::placeholders::_1 ) ) {
declareProperty( "ClonerType", m_clonerType );
declareProperty( "UseOriginalFrom", m_useOriginalFrom, "Take 'from' object from original location" );
// setProperty( "OutputLevel", 1 );
......
......@@ -15,7 +15,7 @@
#include <set>
// Include files
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/function.hpp>
// From MicroDST
......@@ -53,8 +53,9 @@ namespace MicroDST {
/// Standard constructor
RelationsFromClonerAlg( const std::string& name, ISvcLocator* pSvcLocator )
: MicroDSTAlgorithm( name, pSvcLocator )
, m_tableCloner( boost::bind( &RelationsFromClonerAlg<TABLE>::cloneFrom, &( *this ), _1 ),
boost::bind( &RelationsFromClonerAlg<TABLE>::cloneTo, &( *this ), _1 ) ) {}
, m_tableCloner( boost::bind( &RelationsFromClonerAlg<TABLE>::cloneFrom, &( *this ), boost::placeholders::_1 ),
boost::bind( &RelationsFromClonerAlg<TABLE>::cloneTo, &( *this ), boost::placeholders::_1 ) ) {
}
//===========================================================================
StatusCode initialize() override {
......
......@@ -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