Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

[Gazebo9] Fixed fails for OSX: Added using namespace boost::placeholders #2809

Merged
merged 8 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions examples/stand_alone/custom_main_pkgconfig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ link_directories(${GAZEBO_LIBRARY_DIRS})

add_executable(custom_main custom_main.cc)
target_link_libraries(custom_main ${GAZEBO_LIBRARIES})

if(${CMAKE_VERSION} VERSION_LESS "3.13.0")
link_directories(${Boost_LIBRARY_DIRS})
else()
target_link_directories(custom_main PUBLIC ${Boost_LIBRARY_DIRS})
endif()
6 changes: 6 additions & 0 deletions gazebo/gui/model/ModelTreeWidget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*
*/

#include <boost/version.hpp>

#include "gazebo/common/Events.hh"

#include "gazebo/gui/GuiEvents.hh"
Expand Down Expand Up @@ -160,6 +162,10 @@ ModelTreeWidget::ModelTreeWidget(QWidget *_parent)
this->layout()->setContentsMargins(0, 0, 0, 0);

// Connections
#if BOOST_VERSION >= 107300
using namespace boost::placeholders;
#endif

this->connections.push_back(
gui::model::Events::ConnectSaveModel(
boost::bind(&ModelTreeWidget::OnSaveModel, this, _1)));
Expand Down
6 changes: 6 additions & 0 deletions gazebo/gui/model/SchematicViewWidget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*
*/

#include <boost/version.hpp>

#include <ignition/math/Color.hh>

#include "gazebo/rendering/Material.hh"
Expand Down Expand Up @@ -82,6 +84,10 @@ void SchematicViewWidget::Reset()
/////////////////////////////////////////////////
void SchematicViewWidget::Init()
{
#if BOOST_VERSION >= 107300
using namespace boost::placeholders;
#endif

this->connections.push_back(gui::model::Events::ConnectLinkInserted(
boost::bind(&SchematicViewWidget::AddNode, this, _1)));

Expand Down
5 changes: 4 additions & 1 deletion test/plugins/ForceTorqueModelRemovalTestPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*
*/

#include <functional>

#include "plugins/ForceTorqueModelRemovalTestPlugin.hh"

#include "gazebo/sensors/ForceTorqueSensor.hh"
Expand Down Expand Up @@ -53,7 +55,8 @@ void ForceTorqueModelRemovalTestPlugin::Load(sensors::SensorPtr _sensor,

// Create connection
this->updateConnection = gazebo::event::Events::ConnectWorldUpdateBegin(
boost::bind(&ForceTorqueModelRemovalTestPlugin::onUpdate, this, _1));
std::bind(&ForceTorqueModelRemovalTestPlugin::onUpdate, this,
std::placeholders::_1));
}

void ForceTorqueModelRemovalTestPlugin::onUpdate(
Expand Down