2222
2323#include " dynamic-graph/command.h"
2424#include < boost/assign/list_of.hpp>
25- #include < boost/bind.hpp>
25+ #include < boost/bind/bind .hpp>
2626#include < boost/function.hpp>
2727
2828/* --- FUNCTION 0 ARGS ----------------------------------------------------- */
@@ -111,15 +111,17 @@ makeCommandVoid1(E &entity,
111111 // the template arg... why ???
112112 boost::function<void (E *, const T &)> function,
113113 const std::string &docString) {
114- return new CommandVoid1<E, T>(entity, boost::bind (function, &entity, _1),
115- docString);
114+ return new CommandVoid1<E, T>(
115+ entity, boost::bind (function, &entity, boost::placeholders::_1),
116+ docString);
116117}
117118
118119template <class E , typename T>
119120CommandVoid1<E, T> *makeCommandVoid1 (E &entity, void (E::*function)(const T &),
120121 const std::string &docString) {
121- return new CommandVoid1<E, T>(entity, boost::bind (function, &entity, _1),
122- docString);
122+ return new CommandVoid1<E, T>(
123+ entity, boost::bind (function, &entity, boost::placeholders::_1),
124+ docString);
123125 return NULL ;
124126}
125127
@@ -175,16 +177,22 @@ makeCommandVoid2(E &entity,
175177 // the template arg... why ???
176178 boost::function<void (E *, const T1 &, const T2 &)> function,
177179 const std::string &docString) {
178- return new CommandVoid2<E, T1, T2>(
179- entity, boost::bind (function, &entity, _1, _2), docString);
180+ return new CommandVoid2<E, T1, T2>(entity,
181+ boost::bind (function, &entity,
182+ boost::placeholders::_1,
183+ boost::placeholders::_2),
184+ docString);
180185}
181186
182187template <class E , typename T1, typename T2>
183188CommandVoid2<E, T1, T2> *
184189makeCommandVoid2 (E &entity, void (E::*function)(const T1 &, const T2 &),
185190 const std::string &docString) {
186- return new CommandVoid2<E, T1, T2>(
187- entity, boost::bind (function, &entity, _1, _2), docString);
191+ return new CommandVoid2<E, T1, T2>(entity,
192+ boost::bind (function, &entity,
193+ boost::placeholders::_1,
194+ boost::placeholders::_2),
195+ docString);
188196 return NULL ;
189197}
190198
@@ -243,7 +251,10 @@ CommandVoid3<E, T1, T2, T3> *makeCommandVoid3(
243251 boost::function<void (E *, const T1 &, const T2 &, const T3 &)> function,
244252 const std::string &docString) {
245253 return new CommandVoid3<E, T1, T2, T3>(
246- entity, boost::bind (function, &entity, _1, _2, _3), docString);
254+ entity,
255+ boost::bind (function, &entity, boost::placeholders::_1,
256+ boost::placeholders::_2, boost::placeholders::_3),
257+ docString);
247258}
248259
249260template <class E , typename T1, typename T2, typename T3>
@@ -252,7 +263,10 @@ makeCommandVoid3(E &entity,
252263 void (E::*function)(const T1 &, const T2 &, const T3 &),
253264 const std::string &docString) {
254265 return new CommandVoid3<E, T1, T2, T3>(
255- entity, boost::bind (function, &entity, _1, _2, _3), docString);
266+ entity,
267+ boost::bind (function, &entity, boost::placeholders::_1,
268+ boost::placeholders::_2, boost::placeholders::_3),
269+ docString);
256270 return NULL ;
257271}
258272
@@ -317,7 +331,11 @@ CommandVoid4<E, T1, T2, T3, T4> *makeCommandVoid4(
317331 function,
318332 const std::string &docString) {
319333 return new CommandVoid4<E, T1, T2, T3, T4>(
320- entity, boost::bind (function, &entity, _1, _2, _3, _4), docString);
334+ entity,
335+ boost::bind (function, &entity, boost::placeholders::_1,
336+ boost::placeholders::_2, boost::placeholders::_3,
337+ boost::placeholders::_4),
338+ docString);
321339}
322340
323341template <class E , typename T1, typename T2, typename T3, typename T4>
@@ -326,7 +344,11 @@ CommandVoid4<E, T1, T2, T3, T4> *makeCommandVoid4(
326344 void (E::*function)(const T1 &, const T2 &, const T3 &, const T4 &),
327345 const std::string &docString) {
328346 return new CommandVoid4<E, T1, T2, T3, T4>(
329- entity, boost::bind (function, &entity, _1, _2, _3, _4), docString);
347+ entity,
348+ boost::bind (function, &entity, boost::placeholders::_1,
349+ boost::placeholders::_2, boost::placeholders::_3,
350+ boost::placeholders::_4),
351+ docString);
330352 return NULL ;
331353}
332354
@@ -379,8 +401,9 @@ template <class E>
379401CommandVerbose<E> *makeCommandVerbose (E &entity,
380402 void (E::*function)(std::ostream &),
381403 const std::string &docString) {
382- return new CommandVerbose<E>(entity, boost::bind (function, &entity, _1),
383- docString);
404+ return new CommandVerbose<E>(
405+ entity, boost::bind (function, &entity, boost::placeholders::_1),
406+ docString);
384407 return NULL ;
385408}
386409
@@ -484,15 +507,17 @@ makeCommandReturnType1(E &entity,
484507 boost::function<ReturnType(E *, const T &)> function,
485508 const std::string &docString) {
486509 return new CommandReturnType1<E, ReturnType, T>(
487- entity, boost::bind (function, &entity, _1), docString);
510+ entity, boost::bind (function, &entity, boost::placeholders::_1),
511+ docString);
488512}
489513
490514template <class E , typename ReturnType, typename T>
491515CommandReturnType1<E, ReturnType, T> *
492516makeCommandReturnType1 (E &entity, ReturnType (E::*function)(const T &),
493517 const std::string &docString) {
494518 return new CommandReturnType1<E, ReturnType, T>(
495- entity, boost::bind (function, &entity, _1), docString);
519+ entity, boost::bind (function, &entity, boost::placeholders::_1),
520+ docString);
496521 return NULL ;
497522}
498523
@@ -551,7 +576,10 @@ CommandReturnType2<E, ReturnType, T1, T2> *makeCommandReturnType2(
551576 boost::function<ReturnType(E *, const T1 &, const T2 &)> function,
552577 const std::string &docString) {
553578 return new CommandReturnType2<E, ReturnType, T1, T2>(
554- entity, boost::bind (function, &entity, _1, _2), docString);
579+ entity,
580+ boost::bind (function, &entity, boost::placeholders::_1,
581+ boost::placeholders::_2),
582+ docString);
555583}
556584
557585template <class E , typename ReturnType, typename T1, typename T2>
@@ -560,7 +588,10 @@ makeCommandReturnType2(E &entity,
560588 ReturnType (E::*function)(const T1 &, const T2 &),
561589 const std::string &docString) {
562590 return new CommandReturnType2<E, ReturnType, T1, T2>(
563- entity, boost::bind (function, &entity, _1, _2), docString);
591+ entity,
592+ boost::bind (function, &entity, boost::placeholders::_1,
593+ boost::placeholders::_2),
594+ docString);
564595 return NULL ;
565596}
566597
0 commit comments