5

When I build the CGAL examples with cmake, I get this note:

#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.

I tried to add #define BOOST_BIND_NO_PLACEHOLDERS at the very beginning of the code and using namespace BOOST_BIND_GLOBAL_PLACEHOLDERS in the main, but it doesn't work. The code can be built, just a very annoying note.

BOOST VERSION = 1.73 GCC VERSION = 7.5.0

Wasabi
  • 51
  • 3
  • You should open an [issue](https://github.com/CGAL/cgal/issues) with more details including boost version, compiler version, ... – sloriot Jul 27 '20 at 07:05
  • Could you add more details? what example does produce this warning message? The testsuite contains this version of boost and no warning shows up. What compilation options are you using? any specific macro defined? – sloriot Aug 11 '20 at 05:09
  • https://stackoverflow.com/a/65813178/975608 – petke Jan 21 '21 at 09:29
  • I try to add ``` #define BOOST_BIND_NO_PLACEHOLDERS ``` before the problematic include line and it solved the warning for me. Thanks ;-) Please make sure that you include this before all problematic include lines. (Tried with Boost 1.74) – lwinkler Jun 11 '21 at 21:06

1 Answers1

1

For the convenience of old projects, add the following line into CMakeLists.txt to define BOOST_BIND_GLOBAL_PLACEHOLDERS in the whole project.

add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
micfan
  • 800
  • 8
  • 12