Skip to content

Commit

Permalink
Define BOOST_BIND_GLOBAL_PLACEHOLDERS in headers
Browse files Browse the repository at this point in the history
Define this symbol to fix warnings in the specific
header files where we include boost/bind.hpp,
which is more targeted than a -D compiler flag.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters committed Jan 14, 2022
1 parent 06117c4 commit 1718514
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 2 deletions.
6 changes: 5 additions & 1 deletion gazebo/common/MovingWindowFilter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
#include <vector>
#include <map>

#include <boost/function.hpp>
// This fixes compiler warnings, see #3147 and #3160
#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>

Expand Down
6 changes: 5 additions & 1 deletion gazebo/common/WeakBind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
#ifndef GAZEBO_COMMON_WEAKBIND_HH_
#define GAZEBO_COMMON_WEAKBIND_HH_

#include <boost/shared_ptr.hpp>
// This fixes compiler warnings, see #3147 and #3160
#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>

namespace gazebo
{
Expand Down
4 changes: 4 additions & 0 deletions gazebo/transport/Connection.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include <tbb/task.h>
#include <google/protobuf/message.h>

// This fixes compiler warnings, see #3147 and #3160
#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
Expand Down
5 changes: 5 additions & 0 deletions gazebo/transport/Node.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
#define GAZEBO_TRANSPORT_NODE_HH_

#include <tbb/task.h>

// This fixes compiler warnings, see #3147 and #3160
#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif
#include <boost/bind.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <map>
Expand Down
4 changes: 4 additions & 0 deletions gazebo/transport/TopicManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#ifndef GAZEBO_TRANSPORT_TOPICMANAGER_HH_
#define GAZEBO_TRANSPORT_TOPICMANAGER_HH_

// This fixes compiler warnings, see #3147 and #3160
#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <map>
Expand Down
4 changes: 4 additions & 0 deletions gazebo/transport/TransportIface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#ifndef _GAZEBO_TRANSPORTIFACE_HH_
#define _GAZEBO_TRANSPORTIFACE_HH_

// This fixes compiler warnings, see #3147 and #3160
#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif
#include <boost/bind.hpp>
#include <string>
#include <list>
Expand Down

0 comments on commit 1718514

Please sign in to comment.