Skip to content

Commit

Permalink
fix boost bind placeholders
Browse files Browse the repository at this point in the history
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));
      |                                                                                                                  ^~
  • Loading branch information
nim65s committed Feb 18, 2022
1 parent 9c500d6 commit 6c1e697
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unittest/test_contacts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ void test_update_force_diff(ContactModelTypes::Type contact_type, PinocchioModel

void test_partial_derivatives_against_numdiff(ContactModelTypes::Type contact_type,
PinocchioModelTypes::Type model_type) {
#if BOOST_VERSION / 100 % 1000 >= 60
using namespace boost::placeholders;
#endif
// create the model
ContactModelFactory factory;
boost::shared_ptr<crocoddyl::ContactModelAbstract> model = factory.create(contact_type, model_type);
Expand Down
3 changes: 3 additions & 0 deletions unittest/test_costs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ void test_calc_against_numdiff(CostModelTypes::Type cost_type, StateModelTypes::

void test_partial_derivatives_against_numdiff(CostModelTypes::Type cost_type, StateModelTypes::Type state_type,
ActivationModelTypes::Type activation_type) {
#if BOOST_VERSION / 100 % 1000 >= 60
using namespace boost::placeholders;
#endif
// create the model
CostModelFactory factory;
const boost::shared_ptr<crocoddyl::CostModelAbstract>& model =
Expand Down
3 changes: 3 additions & 0 deletions unittest/test_costs_noFF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ void test_calc_against_numdiff(CostModelNoFFTypes::Type cost_type, ActivationMod

void test_partial_derivatives_against_numdiff(CostModelNoFFTypes::Type cost_type,
ActivationModelTypes::Type activation_type) {
#if BOOST_VERSION / 100 % 1000 >= 60
using namespace boost::placeholders;
#endif
// create the model
CostModelFactory factory;
const boost::shared_ptr<crocoddyl::CostModelAbstract>& model = factory.create(cost_type, activation_type);
Expand Down
6 changes: 6 additions & 0 deletions unittest/test_residuals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ void test_calc_returns_a_residual(ResidualModelTypes::Type residual_type, StateM

void test_calc_against_numdiff(ResidualModelTypes::Type residual_type, StateModelTypes::Type state_type,
ActuationModelTypes::Type actuation_type) {
#if BOOST_VERSION / 100 % 1000 >= 60
using namespace boost::placeholders;
#endif
// Create the model
ResidualModelFactory residual_factory;
ActuationModelFactory actuation_factory;
Expand Down Expand Up @@ -108,6 +111,9 @@ void test_calc_against_numdiff(ResidualModelTypes::Type residual_type, StateMode

void test_partial_derivatives_against_numdiff(ResidualModelTypes::Type residual_type, StateModelTypes::Type state_type,
ActuationModelTypes::Type actuation_type) {
#if BOOST_VERSION / 100 % 1000 >= 60
using namespace boost::placeholders;
#endif
// Create the model
ResidualModelFactory residual_factory;
ActuationModelFactory actuation_factory;
Expand Down

0 comments on commit 6c1e697

Please sign in to comment.