Skip to content

Commit 6c1e697

Browse files
committed
fix boost bind placeholders
for for boost 1.78 eg.: crocoddyl/unittest/test_contacts.cpp:170:114: error: '_2' was not declared in this scope 170 | reevals.push_back(boost::bind(&crocoddyl::unittest::updateAllPinocchio, &pinocchio_model, &pinocchio_data, _1, _2)); | ^~
1 parent 9c500d6 commit 6c1e697

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

unittest/test_contacts.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ void test_update_force_diff(ContactModelTypes::Type contact_type, PinocchioModel
146146

147147
void test_partial_derivatives_against_numdiff(ContactModelTypes::Type contact_type,
148148
PinocchioModelTypes::Type model_type) {
149+
#if BOOST_VERSION / 100 % 1000 >= 60
150+
using namespace boost::placeholders;
151+
#endif
149152
// create the model
150153
ContactModelFactory factory;
151154
boost::shared_ptr<crocoddyl::ContactModelAbstract> model = factory.create(contact_type, model_type);

unittest/test_costs.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ void test_calc_against_numdiff(CostModelTypes::Type cost_type, StateModelTypes::
9292

9393
void test_partial_derivatives_against_numdiff(CostModelTypes::Type cost_type, StateModelTypes::Type state_type,
9494
ActivationModelTypes::Type activation_type) {
95+
#if BOOST_VERSION / 100 % 1000 >= 60
96+
using namespace boost::placeholders;
97+
#endif
9598
// create the model
9699
CostModelFactory factory;
97100
const boost::shared_ptr<crocoddyl::CostModelAbstract>& model =

unittest/test_costs_noFF.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ void test_calc_against_numdiff(CostModelNoFFTypes::Type cost_type, ActivationMod
9898

9999
void test_partial_derivatives_against_numdiff(CostModelNoFFTypes::Type cost_type,
100100
ActivationModelTypes::Type activation_type) {
101+
#if BOOST_VERSION / 100 % 1000 >= 60
102+
using namespace boost::placeholders;
103+
#endif
101104
// create the model
102105
CostModelFactory factory;
103106
const boost::shared_ptr<crocoddyl::CostModelAbstract>& model = factory.create(cost_type, activation_type);

unittest/test_residuals.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ void test_calc_returns_a_residual(ResidualModelTypes::Type residual_type, StateM
6363

6464
void test_calc_against_numdiff(ResidualModelTypes::Type residual_type, StateModelTypes::Type state_type,
6565
ActuationModelTypes::Type actuation_type) {
66+
#if BOOST_VERSION / 100 % 1000 >= 60
67+
using namespace boost::placeholders;
68+
#endif
6669
// Create the model
6770
ResidualModelFactory residual_factory;
6871
ActuationModelFactory actuation_factory;
@@ -108,6 +111,9 @@ void test_calc_against_numdiff(ResidualModelTypes::Type residual_type, StateMode
108111

109112
void test_partial_derivatives_against_numdiff(ResidualModelTypes::Type residual_type, StateModelTypes::Type state_type,
110113
ActuationModelTypes::Type actuation_type) {
114+
#if BOOST_VERSION / 100 % 1000 >= 60
115+
using namespace boost::placeholders;
116+
#endif
111117
// Create the model
112118
ResidualModelFactory residual_factory;
113119
ActuationModelFactory actuation_factory;

0 commit comments

Comments
 (0)