boost::lambda -> c++11 lambda

This commit is contained in:
Sébastien Loriot 2023-04-23 22:35:45 +02:00
parent 633ec7329c
commit ea62c316ae
2 changed files with 3 additions and 8 deletions

View File

@ -27,7 +27,6 @@
#include <CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h> #include <CGAL/AABB_tree/internal/Has_nested_type_Shared_data.h>
#include <CGAL/AABB_tree/internal/Primitive_helper.h> #include <CGAL/AABB_tree/internal/Primitive_helper.h>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/lambda/lambda.hpp>
#ifdef CGAL_HAS_THREADS #ifdef CGAL_HAS_THREADS
#include <CGAL/mutex.h> #include <CGAL/mutex.h>
@ -326,7 +325,7 @@ public:
boost::optional< typename Intersection_and_primitive_id<Ray>::Type > boost::optional< typename Intersection_and_primitive_id<Ray>::Type >
first_intersection(const Ray& query) const first_intersection(const Ray& query) const
{ {
return first_intersection(query, boost::lambda::constant(false)); return first_intersection(query, [](Primitive_id){ return false; });
} }
/// \endcond /// \endcond
@ -351,7 +350,7 @@ public:
boost::optional<Primitive_id> boost::optional<Primitive_id>
first_intersected_primitive(const Ray& query) const first_intersected_primitive(const Ray& query) const
{ {
return first_intersected_primitive(query, boost::lambda::constant(false)); return first_intersected_primitive(query, [](Primitive_id){ return false; });
} }
/// \endcond /// \endcond
///@} ///@}

View File

@ -33,8 +33,6 @@
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/math/constants/constants.hpp> #include <boost/math/constants/constants.hpp>
@ -329,7 +327,7 @@ private:
typename FT_list::iterator pos = std::find_if( typename FT_list::iterator pos = std::find_if(
big_moves_.begin(), big_moves_.begin(),
big_moves_.end(), big_moves_.end(),
boost::lambda::_1 < new_sq_move ); [&](const FT& v) { return v< new_sq_move; } );
big_moves_.insert(pos, new_sq_move); big_moves_.insert(pos, new_sq_move);
} }
@ -343,8 +341,6 @@ private:
bool check_convergence() const bool check_convergence() const
{ {
namespace bl = boost::lambda;
FT sum(0); FT sum(0);
for(typename FT_list::const_iterator it = big_moves_.begin(); for(typename FT_list::const_iterator it = big_moves_.begin();
it != big_moves_.end(); it != big_moves_.end();