Commit cfda7a78 authored by Philipp Götze's avatar Philipp Götze
Browse files

Get rid of boost bind pragma message warning

parent b71cce44
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include "libcpp/mpl/sequences/GenerateIndexes.hpp" #include "libcpp/mpl/sequences/GenerateIndexes.hpp"
#include <boost/bind.hpp> #include <boost/bind/bind.hpp>
namespace ns_utilities { namespace ns_utilities {
...@@ -67,22 +66,22 @@ namespace impl { ...@@ -67,22 +66,22 @@ namespace impl {
* @return a function object for the bound function * @return a function object for the bound function
*/ */
template< template<
typename ReturnType, typename ReturnType,
class ClassType, class ClassType,
class... Args, class... Args,
int... Indexes int... Indexes
> >
auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...), ClassType* instance, auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...), ClassType* instance,
ns_mpl::IndexTuple< Indexes... > indexes ) ns_mpl::IndexTuple< Indexes... > indexes )
-> decltype( -> decltype(
boost::bind( memberFn, instance, boost::arg< Indexes >()... ) boost::bind( memberFn, instance, boost::arg< Indexes >()... )
) )
{ {
return boost::bind( memberFn, instance, return boost::bind( memberFn, instance,
// generate a placeholder for each index in the Indexes list // generate a placeholder for each index in the Indexes list
// using parameter pack expansion // using parameter pack expansion
boost::arg< Indexes >()... boost::arg< Indexes >()...
); );
} }
/** /**
...@@ -107,22 +106,22 @@ auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...), ClassType* ...@@ -107,22 +106,22 @@ auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...), ClassType*
* @return a function object for the bound function * @return a function object for the bound function
*/ */
template< template<
typename ReturnType, typename ReturnType,
class ClassType, class ClassType,
class... Args, class... Args,
int... Indexes int... Indexes
> >
auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...) const, const ClassType* instance, auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...) const, const ClassType* instance,
ns_mpl::IndexTuple< Indexes... > indexes ) ns_mpl::IndexTuple< Indexes... > indexes )
-> decltype( -> decltype(
boost::bind( memberFn, instance, boost::arg< Indexes >()... ) boost::bind( memberFn, instance, boost::arg< Indexes >()... )
) )
{ {
return boost::bind( memberFn, instance, return boost::bind( memberFn, instance,
// generate a placeholder for each index in the Indexes list // generate a placeholder for each index in the Indexes list
// using parameter pack expansion // using parameter pack expansion
boost::arg< Indexes >()... boost::arg< Indexes >()...
); );
} }
} /* end namespace impl */ } /* end namespace impl */
...@@ -151,27 +150,27 @@ auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...) const, const ...@@ -151,27 +150,27 @@ auto bindVariadicImpl( ReturnType (ClassType::* memberFn) (Args...) const, const
* @return a function object for the bound function * @return a function object for the bound function
*/ */
template< template<
typename ReturnType, typename ReturnType,
class ClassType, class ClassType,
typename ... Args typename ... Args
> >
auto bindVariadic( ReturnType (ClassType::* memberFn) (Args...), ClassType* instance ) auto bindVariadic( ReturnType (ClassType::* memberFn) (Args...), ClassType* instance )
-> decltype( -> decltype(
impl::bindVariadicImpl< ReturnType >( impl::bindVariadicImpl< ReturnType >(
memberFn, instance, typename ns_mpl::generateIndexes< sizeof...(Args), 1 >::type() memberFn, instance, typename ns_mpl::generateIndexes< sizeof...(Args), 1 >::type()
) )
) )
{ {
return impl::bindVariadicImpl< ReturnType >( memberFn, instance, return impl::bindVariadicImpl< ReturnType >( memberFn, instance,
// determine the number of provided arguments during compile time // determine the number of provided arguments during compile time
// with generating an appropriate integer tuple with generateIndexes // with generating an appropriate integer tuple with generateIndexes
// and provide a default constructed instance of that type to // and provide a default constructed instance of that type to
// instantiate the correct implementation of the actual bind helper // instantiate the correct implementation of the actual bind helper
// function that binds all arguments correctly // function that binds all arguments correctly
typename ns_mpl::generateIndexes< typename ns_mpl::generateIndexes<
sizeof...(Args), // for each argument in the list sizeof...(Args), // for each argument in the list
1 // starting with placeholder index 1 1 // starting with placeholder index 1
>::type() >::type()
); );
} }
...@@ -192,27 +191,27 @@ auto bindVariadic( ReturnType (ClassType::* memberFn) (Args...), ClassType* inst ...@@ -192,27 +191,27 @@ auto bindVariadic( ReturnType (ClassType::* memberFn) (Args...), ClassType* inst
* @return a function object for the bound function * @return a function object for the bound function
*/ */
template< template<
typename ReturnType, typename ReturnType,
class ClassType, class ClassType,
typename ... Args typename ... Args
> >
auto bindVariadic( ReturnType (ClassType::* memberFn) (Args...) const, const ClassType* instance ) auto bindVariadic( ReturnType (ClassType::* memberFn) (Args...) const, const ClassType* instance )
-> decltype( -> decltype(
impl::bindVariadicImpl< ReturnType >( impl::bindVariadicImpl< ReturnType >(
memberFn, instance, typename ns_mpl::generateIndexes< sizeof...(Args), 1 >::type() memberFn, instance, typename ns_mpl::generateIndexes< sizeof...(Args), 1 >::type()
) )
) )
{ {
return impl::bindVariadicImpl< ReturnType >( memberFn, instance, return impl::bindVariadicImpl< ReturnType >( memberFn, instance,
// determine the number of provided arguments during compile time // determine the number of provided arguments during compile time
// with generating an appropriate integer tuple with generateIndexes // with generating an appropriate integer tuple with generateIndexes
// and provide a default constructed instance of that type to // and provide a default constructed instance of that type to
// instantiate the correct implementation of the actual bind helper // instantiate the correct implementation of the actual bind helper
// function that binds all arguments correctly // function that binds all arguments correctly
typename ns_mpl::generateIndexes< typename ns_mpl::generateIndexes<
sizeof...(Args), // for each argument in the list sizeof...(Args), // for each argument in the list
1 // starting with placeholder index 1 1 // starting with placeholder index 1
>::type() >::type()
); );
} }
......
...@@ -177,8 +177,8 @@ namespace pfabric { ...@@ -177,8 +177,8 @@ namespace pfabric {
/** /**
* Creates a new instance of the operator. * Creates a new instance of the operator.
*/ */
Queue() : mNotifier(new DequeueNotifier(boost::bind(&Queue::dequeueTuple, this, _1), Queue() : mNotifier(new DequeueNotifier(std::bind(&Queue::dequeueTuple, this, std::placeholders::_1),
boost::bind(&Queue::stopProcessing, this))) { std::bind(&Queue::stopProcessing, this))) {
} }
/** /**
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "libcpp/mpl/algorithms/StaticForEach.hpp" #include "libcpp/mpl/algorithms/StaticForEach.hpp"
#include <boost/bind.hpp>
#include <boost/mpl/vector.hpp> #include <boost/mpl/vector.hpp>
...@@ -145,7 +144,7 @@ struct SignalTest { ...@@ -145,7 +144,7 @@ struct SignalTest {
{ // test global function { // test global function
// create the signal and connect a test slot // create the signal and connect a test slot
Signal signal; Signal signal;
auto connection = SignalInterface::connect( signal, boost::bind(&globalFunction, ::_1, ::_2 ) ); auto connection = SignalInterface::connect( signal, std::bind(&globalFunction, std::placeholders::_1, std::placeholders::_2 ) );
// invoke the signal // invoke the signal
testResults.reset(); testResults.reset();
......
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