CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.99k stars 1.39k forks source link

Fix frequent Boost warnings about bind.hpp and function_output_iterator.hpp #5303

Closed joachim-reichel closed 3 years ago

joachim-reichel commented 3 years ago

Compiling the demos/examples with Boost 1.74.0 creates a huge number of new warnings (the number at the start of each line denotes the count):

    274 /usr/include/boost/bind.hpp:36:1: 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.’
    210 /usr/include/boost/function_output_iterator.hpp:14:1: note: ‘#pragma message: This header is deprecated. Use <boost/iterator/function_output_iterator.hpp> instead.’

While at it, getting rid of this (older) warning might be nice too:

      4 /usr/include/boost/timer.hpp:21:1: note: ‘#pragma message: This header is deprecated. Use the facilities in <boost/timer/timer.hpp> instead.’

Not sure when the replacement headers got introduced. Fixing this might require bumping the minimum supported Boost version.

afabri commented 3 years ago

function_output_iterator moved starting from 66_0, and as that is the minimal version as written here, we can just change it.

afabri commented 3 years ago

@sloriot what shall we do for boost::bind? Doing what the warning says, or replacing it with std::bind or with lambdas? It can for example be found in the ch_bykat_impl.h

afabri commented 3 years ago

As for the boost timer, it is not in headers but in the Minkowski_sum_2 examples and test cpps