diff --git a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h index 91aaa9972f8..b9f3906da7e 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h +++ b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse.h @@ -410,7 +410,7 @@ class QP_basis_inverse { m_it1 = M.begin()+l; for ( row = 0; row < s; ++row, ++m_it1) { std::transform( m_it1->begin(), m_it1->begin()+s, m_it1->begin(), - boost::bind2nd( std::multiplies(), d)); + [this](const ET& v){return v * this->d;}); } // new denominator: |det(A_B)|^2 diff --git a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h index 10873b0db55..58887c6f9c1 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h +++ b/QP_solver/include/CGAL/QP_solver/QP_basis_inverse_impl.h @@ -178,13 +178,11 @@ z_replace_original_by_original(ForwardIterator y_l_it, // tmp_l -part std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(), - compose2_2(std::plus(), Identity(), - boost::bind1st(std::multiplies(), s_delta))); + [&s_delta](const ET& v1, const ET& v2){ return Identity()(v1) + v2 * s_delta; }); // tmp_x -part std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(), - compose2_2(std::plus(), Identity(), - boost::bind1st(std::multiplies(), s_delta))); + [&s_delta](const ET& v1, const ET& v2){ return Identity()(v1) + v2 * s_delta; }); tmp_x[k_i] -= d; // prepare \hat{k}_{2} -scalar diff --git a/QP_solver/test/QP_solver/test_bind.cpp b/QP_solver/test/QP_solver/test_bind.cpp index 3733f359200..b1c592c9be2 100644 --- a/QP_solver/test/QP_solver/test_bind.cpp +++ b/QP_solver/test/QP_solver/test_bind.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include // functor int x int -> Quotient, (a,b) -> a/b // ------------------------------------------------ @@ -26,8 +26,8 @@ int main() // --------------------------------------- int three = 3; int two = 2; - std::cout << boost::bind - (Quotient_inverter(), boost::bind + std::cout << std::bind + (Quotient_inverter(), std::bind (Quotient_creator(), _1, _2)) // ...and apply it to (3, 2) // -------------------------