Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix boost::placeholder workaround missed in ParamContainer #337

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions cpp/common/include/ParamContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include <boost/function.hpp>
#include <boost/bind/bind.hpp>

#ifdef BOOST_HAS_PLACEHOLDERS
using namespace boost::placeholders;
#endif

namespace OdinData
{

Expand Down Expand Up @@ -127,12 +131,12 @@ class ParamContainer
{
// Bind the parameter into the setter function map
setter_map_[path] = boost::bind(
&ParamContainer::param_set<T>, this, boost::ref(param), boost::placeholders::_1
&ParamContainer::param_set<T>, this, boost::ref(param), _1
);

// Bind the parameter into the getter function map
getter_map_[path] = boost::bind(
&ParamContainer::param_get<T>, this, boost::ref(param), boost::placeholders::_1
&ParamContainer::param_get<T>, this, boost::ref(param), _1
);

}
Expand All @@ -151,14 +155,12 @@ class ParamContainer
{
// Bind the vector parameter into the setter function map
setter_map_[path] = boost::bind(
&ParamContainer::vector_param_set<T>, this, boost::ref(param),
boost::placeholders::_1
&ParamContainer::vector_param_set<T>, this, boost::ref(param), _1
);

// Bind the vector parameter into the getter function map
getter_map_[path] = boost::bind(
&ParamContainer::vector_param_get<T>, this, boost::ref(param),
boost::placeholders::_1
&ParamContainer::vector_param_get<T>, this, boost::ref(param), _1
);
}

Expand Down
Loading