use std tuple

This commit is contained in:
Sébastien Loriot 2025-02-05 16:54:18 +01:00
parent 1b9dca6e1f
commit 6f65025259
3 changed files with 26 additions and 25 deletions

View File

@ -52,8 +52,7 @@
#ifndef CGAL_NO_ASSERTIONS
# include <boost/math/special_functions/next.hpp> // for float_prior
#endif
#include <optional>
#include <boost/tuple/tuple.hpp>
#include <boost/unordered_map.hpp>
#include <boost/unordered_set.hpp>
@ -62,10 +61,12 @@
#include <fstream>
#include <iterator>
#include <list>
#include <optional>
#include <sstream>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
@ -511,11 +512,11 @@ private:
const Vertex_handle v2,
const Curve_index& curve_index) const;
boost::tuple<Bare_point, Bare_point, Bare_point> get_positions(const Vertex_handle v1,
const Vertex_handle v2,
const Vertex_handle v3,
const Curve_index& curve_index,
const CGAL::Orientation orientation) const;
std::tuple<Bare_point, Bare_point, Bare_point> get_positions(const Vertex_handle v1,
const Vertex_handle v2,
const Vertex_handle v3,
const Curve_index& curve_index,
const CGAL::Orientation orientation) const;
private:
C3T3& c3t3_;
@ -953,9 +954,9 @@ get_positions_with_unknown_orientation(const Vertex_handle v1,
template <typename C3T3, typename MD, typename Sf>
boost::tuple<typename Protect_edges_sizing_field<C3T3, MD, Sf>::Bare_point,
typename Protect_edges_sizing_field<C3T3, MD, Sf>::Bare_point,
typename Protect_edges_sizing_field<C3T3, MD, Sf>::Bare_point>
std::tuple<typename Protect_edges_sizing_field<C3T3, MD, Sf>::Bare_point,
typename Protect_edges_sizing_field<C3T3, MD, Sf>::Bare_point,
typename Protect_edges_sizing_field<C3T3, MD, Sf>::Bare_point>
Protect_edges_sizing_field<C3T3, MD, Sf>::
get_positions(const Vertex_handle v1,
const Vertex_handle v2,
@ -969,7 +970,7 @@ get_positions(const Vertex_handle v1,
std::tie(p2_check, p3) = get_positions(v2, v3, curve_index, orientation);
CGAL_assertion(p2_check == p2);
return boost::make_tuple(p1, p2, p3);
return std::make_tuple(p1, p2, p3);
}

View File

@ -24,7 +24,7 @@
#include <CGAL/number_utils.h>
#include <CGAL/Origin.h>
#include <boost/tuple/tuple.hpp>
#include <tuple>
namespace CGAL {
@ -102,7 +102,7 @@ namespace CGAL {
{
const Self& oracle;
boost::tuple<int, FT, FT>
std::tuple<int, FT, FT>
intersection_line_sphere_lambda(const Surface_3& sphere,
const Point& a,
const Point& b) const
@ -154,18 +154,18 @@ namespace CGAL {
switch( CGAL::sign(deltaprime) )
{
case ZERO:
return boost::make_tuple(1, ab_ac / ab2, 0);
return std::make_tuple(1, ab_ac / ab2, 0);
case POSITIVE:
{
const FT sqrt_deltaprime = CGAL::sqrt(deltaprime);
return boost::make_tuple(2,
(ab_ac - sqrt_deltaprime) / ab2,
(ab_ac + sqrt_deltaprime) / ab2);
return std::make_tuple(2,
(ab_ac - sqrt_deltaprime) / ab2,
(ab_ac + sqrt_deltaprime) / ab2);
}
case NEGATIVE:
break;
}
return boost::make_tuple(0, 0, 0);
return std::make_tuple(0, 0, 0);
} //end intersection_line_sphere_lambda
template <class Assert_on_lambda>

View File

@ -27,7 +27,7 @@
#include <CGAL/number_utils.h>
#include <CGAL/Origin.h>
#include <boost/tuple/tuple.hpp>
#include <tuple>
namespace CGAL {
@ -96,7 +96,7 @@ namespace CGAL {
{
const Self& oracle;
boost::tuple<int, FT, FT>
std::tuple<int, FT, FT>
intersection_line_sphere_lambda(const Surface_3& sphere,
const Point& a,
const Point& b) const
@ -148,18 +148,18 @@ namespace CGAL {
switch( CGAL::sign(deltaprime) )
{
case ZERO:
return boost::make_tuple(1, ab_ac / ab2, 0);
return std::make_tuple(1, ab_ac / ab2, 0);
case POSITIVE:
{
const FT sqrt_deltaprime = CGAL::sqrt(deltaprime);
return boost::make_tuple(2,
(ab_ac - sqrt_deltaprime) / ab2,
(ab_ac + sqrt_deltaprime) / ab2);
return std::make_tuple(2,
(ab_ac - sqrt_deltaprime) / ab2,
(ab_ac + sqrt_deltaprime) / ab2);
}
case NEGATIVE:
break;
}
return boost::make_tuple(0, 0, 0);
return std::make_tuple(0, 0, 0);
} //end intersection_line_sphere_lambda
template <class Assert_on_lambda>