From b8ce7d12f0fa309dcf6dbc20326cf0196883ae15 Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Mon, 23 Oct 2023 15:55:22 +0300
Subject: [PATCH 01/12] Fixed comment

---
 .../include/CGAL/Surface_sweep_2/Default_visitor_base.h         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_visitor_base.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_visitor_base.h
index 87710c95ec30..441e96824887 100644
--- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_visitor_base.h
+++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_visitor_base.h
@@ -84,7 +84,7 @@ class Default_visitor_base {
   /*! Destructor */
   virtual ~Default_visitor_base() {}
 
-  /*! Attach the a sweep-line object. */
+  /*! Attach a sweep-line object. */
   void attach(Surface_sweep_2* sl) { m_surface_sweep = sl; }
 
   /*!

From 4c3363601249630ad31f060febaff90e176aed6f Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Mon, 23 Oct 2023 15:56:51 +0300
Subject: [PATCH 02/12] Removed redundant include statement

---
 Surface_sweep_2/include/CGAL/Surface_sweep_2.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2.h
index a816ba72255e..1c1d0df3a067 100644
--- a/Surface_sweep_2/include/CGAL/Surface_sweep_2.h
+++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2.h
@@ -24,7 +24,6 @@
 #include <list>
 #include <vector>
 
-#include <CGAL/Object.h>
 #include <CGAL/No_intersection_surface_sweep_2.h>
 #include <CGAL/Surface_sweep_2/Random_access_output_iterator.h>
 #include <CGAL/algorithm.h>

From 042629e464ca0cbc130aff934df529794402426c Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Mon, 23 Oct 2023 16:03:07 +0300
Subject: [PATCH 03/12] Fixed inserter; introduced extractor

---
 .../include/CGAL/IO/Gps_iostream.h            | 57 ++++++++++++++-----
 1 file changed, 44 insertions(+), 13 deletions(-)

diff --git a/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h b/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h
index eae28c242a14..85847e0574f7 100644
--- a/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h
+++ b/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h
@@ -19,30 +19,61 @@
 
 #include <iostream>
 #include <list>
+#include <algorithm>
 
 #include <CGAL/basic.h>
 #include <CGAL/General_polygon_set_2.h>
 
 namespace CGAL {
 
-template <typename Traits>
-std::ostream & operator<< (std::ostream& os,
-                           const CGAL::General_polygon_set_2<Traits> & pgn_set)
-{
-  typedef typename CGAL::General_polygon_set_2<Traits>::Polygon_with_holes_2
-                                                        Polygon_with_holes_2;
-  typedef std::list<Polygon_with_holes_2>               Pgn_with_holes_container;
-
-  Pgn_with_holes_container res;
-  pgn_set.polygons_with_holes (std::back_inserter (res));
+/*! Inserter operator for general polygons sets.
+ * Inserts a general polygon set into an output stream.
+ * \param os the output stream.
+ * \param pgn_set the general polygon set.
+ * \return the output stream.
+ */
+template <typename GeomTraits_, typename Dcel_>
+std::ostream&
+operator<<(std::ostream& os,
+           const CGAL::General_polygon_set_2<GeomTraits_, Dcel_>& pgn_set) {
+  using Geometry_traits_2 = GeomTraits_;
+  using Dcel = Dcel_;
+  using Gps = CGAL::General_polygon_set_2<Geometry_traits_2, Dcel>;
+  using Pwh_2 = typename Gps::Polygon_with_holes_2;
+  using Pgn_with_holes_container = std::list<Pwh_2>;
 
+  Pgn_with_holes_container pwhs;
+  pgn_set.polygons_with_holes(std::back_inserter(pwhs));
   std::cout << pgn_set.number_of_polygons_with_holes() << std::endl;
-  std::copy(res.begin(), res.end(),
-            std::ostream_iterator<Polygon_with_holes_2>(std::cout, "\n"));
-
+  std::copy(pwhs.begin(), pwhs.end(), std::ostream_iterator<Pwh_2>(os, "\n"));
   return os;
 }
 
+/*! Extractor operator for general polygons sets.
+ * Extracts a general polygon set from an input stream.
+ * \param is the input stream.
+ * \param pgn_set the general polygon set.
+ * \return the input stream.
+ */
+template <typename GeomTraits_, typename Dcel_>
+std::istream&
+operator>>(std::istream& is,
+           CGAL::General_polygon_set_2<GeomTraits_, Dcel_>& pgn_set) {
+  using Geometry_traits_2 = GeomTraits_;
+  using Dcel = Dcel_;
+  using Gps = CGAL::General_polygon_set_2<Geometry_traits_2, Dcel>;
+  using Pwh_2 = typename Gps::Polygon_with_holes_2;
+
+  int n;
+  is >> n;
+  for (int i = 0; i < n; ++i) {
+    Pwh_2 pwh;
+    is >> pwh;
+    pgn_set.insert(pwh);
+  }
+  return is;
+}
+
 } //namespace CGAL
 
 #include <CGAL/enable_warnings.h>

From 2e32820dd370e8da68dd91959844629b8b3e34ce Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Mon, 23 Oct 2023 16:07:57 +0300
Subject: [PATCH 04/12] ixed parameter types if interface functions

---
 .../include/CGAL/Arr_conic_traits_2.h                 | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h
index 3576237f6996..6d89990e202c 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h
@@ -2258,7 +2258,7 @@ class Arr_conic_traits_2 {
      */
     Curve_2 operator()(const Rational& r, const Rational& s, const Rational& t,
                        const Rational& u, const Rational& v, const Rational& w,
-                       const Orientation& orient,
+                       Orientation orient,
                        const Point_2& source, const Point_2& target) const {
       // Make sure that the source and the taget are not the same.
       const auto alg_kernel = m_traits.m_alg_kernel;
@@ -2280,7 +2280,7 @@ class Arr_conic_traits_2 {
      * \pre The three points must not be collinear.
      */
     Curve_2 operator()(const Rat_point_2& p1, const Rat_point_2& p2,
-                       const Rat_point_2& p3) {
+                       const Rat_point_2& p3) const {
       Curve_2 arc;
 
       // Set the source and target.
@@ -2363,7 +2363,7 @@ class Arr_conic_traits_2 {
      */
     Curve_2 operator()(const Rat_point_2& p1, const Rat_point_2& p2,
                        const Rat_point_2& p3, const Rat_point_2& p4,
-                       const Rat_point_2& p5) {
+                       const Rat_point_2& p5) const {
       Curve_2 arc;
 
       // Make sure that no three points are collinear.
@@ -2457,7 +2457,7 @@ class Arr_conic_traits_2 {
      */
     Curve_2 operator()(const Rational& r, const Rational& s, const Rational& t,
                        const Rational& u, const Rational& v, const Rational& w,
-                       const Orientation& orient,
+                       Orientation orient,
                        const Point_2& app_source,
                        const Rational& r_1, const Rational& s_1,
                        const Rational& t_1, const Rational& u_1,
@@ -2724,9 +2724,8 @@ class Arr_conic_traits_2 {
      * \pre The source and the target must be on the conic boundary and must
      *      not be the same.
      */
-    Curve_2 operator()(const Rat_circle_2& circ, const Orientation& orient,
+    Curve_2 operator()(const Rat_circle_2& circ, Orientation orient,
                        const Point_2& source, const Point_2& target) const {
-
       // Make sure that the source and the taget are not the same.
       CGAL_precondition_code(auto cmp_xy =
                                m_traits.m_alg_kernel->compare_xy_2_object());

From 3f8ea79eb792f7fcd50922a955473e3da73049bc Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Mon, 23 Oct 2023 16:20:07 +0300
Subject: [PATCH 05/12] Added min_area_tri.tex and jeep.tex

---
 .../Arrangement_on_surface_2/fig_src/jeep.tex   | 11 +++++++++++
 .../Arrangement_on_surface_2/fig_src/makefile   |  4 +++-
 .../fig_src/min_area_tri.tex                    | 17 +++++++++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/jeep.tex
 create mode 100644 Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/min_area_tri.tex

diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/jeep.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/jeep.tex
new file mode 100644
index 000000000000..abd944d4d68d
--- /dev/null
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/jeep.tex
@@ -0,0 +1,11 @@
+\documentclass[tikz, border=5mm]{standalone}
+\usepackage{tikz}
+\usetikzlibrary{patterns.meta}
+\usetikzlibrary{shapes.geometric}
+\begin{document}
+\begin{tikzpicture}
+    \draw[line width=0.2pt,draw=black,
+      pattern={Hatch[angle=45,distance={6pt},line width=0.4pt]},
+      pattern color=black](0,0) rectangle (10,6);
+\end{tikzpicture}
+\end{document}
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/makefile b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/makefile
index c0fa903663d8..5d139e1af614 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/makefile
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/makefile
@@ -49,7 +49,9 @@ TARGETS = \
   overlay_color.pdf \
   bgl_primal_adapter.pdf \
   bgl_dual_adapter.pdf \
-  unb_asymptote.pdf
+  unb_asymptote.pdf \
+  min_area_tri.pdf \
+  jeep.pdf
 
 .DEFAULT_GOAL = all
 .PHONY: all clean
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/min_area_tri.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/min_area_tri.tex
new file mode 100644
index 000000000000..aff139201b0a
--- /dev/null
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/min_area_tri.tex
@@ -0,0 +1,17 @@
+\documentclass[11pt]{report}
+\input{header}
+\pagestyle{empty}
+\begin{document}
+\begin{tikzpicture}[scale=1.0,thick]
+  \myAxes[4pt]{-2.5}{-1.5}{2.5}{2.5}
+  \foreach \x in {-2,...,2} \node[label={[label distance=-6pt]-45:{\scriptsize $\x$}}] at (\x,0) {};
+  \foreach \y in {-1,...,2} \node[label={[label distance=-6pt]135:{\scriptsize $\y$}}] at (0,\y) {};
+  \draw[step=1.0,dotted](-2,-1)grid(2,2);
+  \filldraw[fill=lightred,draw=darkred](-1,0)--(-0.5,1)--( 1,1)--cycle;
+  \arrpZ[45](-2,2.25){1}
+  \arrpZ[135](-1,0){2}
+  \arrpZ[135](-0.5,1){3}
+  \arrpZ[45]( 0.5,-1){4}
+  \arrpZ[45]( 1,1){5}
+\end{tikzpicture}%
+\end{document}

From dedb100fa83821544ce4ba07529f8b932ebc9001 Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Mon, 23 Oct 2023 16:23:04 +0300
Subject: [PATCH 06/12] Ported to tikz

---
 .../fig_src/arr_segs.tex                      | 175 +++++++++--------
 .../fig_src/bezier_curves.tex                 |   2 +-
 .../fig_src/header.tex                        |  65 ++++++-
 .../fig_src/insert.tex                        | 180 +++++++++---------
 4 files changed, 236 insertions(+), 186 deletions(-)

diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/arr_segs.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/arr_segs.tex
index e6198387b5f0..e25fa3fd2be2 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/arr_segs.tex
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/arr_segs.tex
@@ -2,98 +2,95 @@
 \input{header}
 \pagestyle{empty}
 \begin{document}
-\psscalebox{1.8}{\arrset{0.8}
-  \pspicture[](-0.2,-0.2)(12.2,12.2)
-  %\psgrid(0,0)(12,12)
-  \arrMainVertex( 1, 3){a}
-  \arrMainVertex( 2, 4){b}
-  \arrMainVertex( 0, 6){c}
-  \arrv[90](5,11){1}
-  \arrMainVertex(9,11){f}
-  \arrMainVertex(12, 8){g}
-  \arrv[-60](8,8){2}
-  \arrMainVertex( 8, 4){i}
-  \arrMainVertex( 6, 4){j}
-  \arrMainVertex( 6, 2){k}
-  \arrMainVertex( 4, 0){m}
-  \arrMainVertex( 9, 0){n}
-  \arrMainVertex(11, 2){o}
-  \arrMainVertex(12, 4){p}
-  \arrMainVertex(12, 0){q}
-  \arrMainVertex( 4, 2){r}
-  \arrMainVertex( 3, 3){s}
-  \arrMainVertex( 5, 3){t}
+\begin{tikzpicture}[scale=1.0,thick]
+  \node[point] at ( 1, 3) (a) {};
+  \node[point] at ( 2, 4) (b) {};
+  \node[point] at ( 0, 6) (c) {};
+  \node [point,label={[label distance=0pt]90:{$v_1$}}] at ( 5,11) (1) {};
+  \node[point] at ( 9,11) (f) {};
+  \node[point] at (12, 8) (g) {};
+  \node [point,label={[label distance=0pt]-45:{$v_2$}}] at ( 8, 8) (2) {};
+  \node[point] at ( 8, 4) (i) {};
+  \node[point] at ( 6, 4) (j) {};
+  \node[point] at ( 6, 2) (k) {};
+  \node[point] at ( 4, 0) (m) {};
+  \node[point] at ( 9, 0) (n) {};
+  \node[point] at (11, 2) (o) {};
+  \node[point] at (12, 4) (p) {};
+  \node[point] at (12, 0) (q) {};
+  \node[point] at ( 4, 2) (r) {};
+  \node[point] at ( 3, 3) (s) {};
+  \node[point] at ( 5, 3) (t) {};
   %
-  \ncline[linewidth=0.5pt,linecolor=blue]{a}{b}
-  \ncline[linewidth=0.5pt,linecolor=blue]{b}{c}
-  \ncline[linewidth=0.5pt,linecolor=blue]{c}{1}
-  \ncline[linewidth=0.5pt,linecolor=blue]{1}{f}
-  \ncline[linewidth=0.5pt,offset=3pt,nodesepB=6pt]{->}{f}{1}\Aput[1pt]{$e_{\mathrm{prev}}$}
-  \ncline[linewidth=0.5pt,linecolor=blue]{f}{g}
-  \ncline[linewidth=0.5pt,linecolor=blue]{g}{2}
-  \ncline[linewidth=0.5pt,linecolor=blue]{g}{2}
-  \ncline[linewidth=0.5pt,offset=3pt,nodesepB=4pt]{->}{2}{g}\Aput[1pt]{$e_{\mathrm{next}}$}
-  \ncline[linewidth=0.5pt,linecolor=blue]{2}{i}
-  \ncline[linewidth=0.5pt,linecolor=blue]{i}{j}
-  \ncline[linewidth=0.5pt,linecolor=blue]{j}{k}
-  \ncline[linewidth=0.5pt,linecolor=blue]{k}{m}
-  \ncline[linewidth=0.5pt,linecolor=blue]{m}{a}
-  \ncline[linewidth=0.5pt,linecolor=blue]{1}{2}
-  \ncline[linewidth=0.5pt,linecolor=blue]{g}{i}
-  \ncline[linewidth=0.5pt,linecolor=blue]{m}{n}
-  \ncline[linewidth=0.5pt,linecolor=blue]{n}{i}
-  \ncline[linewidth=0.5pt,linecolor=blue]{g}{n}
-  \ncline[linewidth=0.5pt,linecolor=blue]{n}{o}
-  \ncline[linewidth=0.5pt,linecolor=blue]{o}{p}
-  \ncline[linewidth=0.5pt,linecolor=blue]{p}{q}
-  \ncline[linewidth=0.5pt,linecolor=blue]{q}{o}
-  \ncline[linewidth=0.5pt,linecolor=blue]{r}{s}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{r}{s}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{s}{r}
-  \ncline[linewidth=0.5pt,linecolor=blue]{r}{t}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{r}{t}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{t}{r}
+  \draw[blue] (a)--(b);
+  \draw[blue] (b)--(c);
+  \draw[blue] (c)--(1);
+  \draw[blue] (1)--(f);
+  \draw [halfedge,shorten >=4pt] (f) to node[sloped,below]{$e_{\mathrm{prev}}$} (1);
+  \draw[blue] (f)--(g);
+  \draw[blue] (g)--(2);
+  \draw [halfedge,shorten >=4pt] (2) to node[sloped,above]{$e_{\mathrm{next}}$} (g);
+  \draw[blue] (2)--(i);
+  \draw[blue] (i)--(j);
+  \draw[blue] (j)--(k);
+  \draw[blue] (k)--(m);
+  \draw[blue] (m)--(a);
+  \draw[blue] (1)--(2);
+  \draw[blue] (g)--(i);
+  \draw[blue] (m)--(n);
+  \draw[blue] (n)--(i);
+  \draw[blue] (g)--(n);
+  \draw[blue] (n)--(o);
+  \draw[blue] (o)--(p);
+  \draw[blue] (p)--(q);
+  \draw[blue] (q)--(o);
+  \draw[blue] (r)--(s);
   %
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{b}{a}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{c}{b}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{1}{c}
-  \ncline[linewidth=0.5pt,offset=3pt,nodesepA=4pt]{->}{g}{f}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{i}{2}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{j}{i}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{k}{j}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{m}{k}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{a}{m}
-  \ncline[linewidth=0.5pt,offset=3pt,nodesepA=6pt]{->}{1}{2}\Aput[1pt]{$e$}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{2}{1}\Aput[1pt]{$e'$}
+  \path [halfedge] (r) edge (s);
+  \path [halfedge] (s) edge (r);
+  \draw [blue] (r)--(t);
+  \path [halfedge] (r) edge (t);
+  \path [halfedge] (t) edge (r);
   %
-  \rput(2,10){$f_0$}
-  \rput(3,4){$f_1$}
-  \rput(8.5,9.5){$f_2$}
-  \rput(5,7){$f_3$}
-  \rput(4.5,5.6){$f_4$}
+  \path [halfedge] (b) edge (a);
+  \path [halfedge] (c) edge (b);
+  \path [halfedge] (1) edge (c);
+  \path [halfedge,shorten <=4pt] (g) edge (f);
+  \path [halfedge] (i) edge (2);
+  \path [halfedge] (j) edge (i);
+  \path [halfedge] (k) edge (j);
+  \path [halfedge] (m) edge (k);
+  \path [halfedge] (a) edge (m);
+  \draw [halfedge,shorten <=4pt] (1) to node[sloped,above=-1pt]{$e$} (2);
+  \draw [halfedge] (2) to node[sloped,below=-1pt]{$e'$} (1);
   %
-  \arru[90](2,6){1}
-  \arru[90](5,9){2}
+  \node at (2,10){$f_0$};
+  \node at (3,4){$f_1$};
+  \node at (8.5,9.5){$f_2$};
+  \node at (5,7){$f_3$};
+  \node at (4.5,5.6){$f_4$};
   %
-  \arrMainVertex(4,5){a}
-  \arrMainVertex(4,7){b}
-  \arrMainVertex(5,8){c}
-  \arrMainVertex(5,4){f}
-  \arrMainVertex(5,6){e}
-  \arrMainVertex(6,7){d}
-  \ncline[linewidth=0.5pt,linecolor=blue]{a}{b}
-  \ncline[linewidth=0.5pt,linecolor=blue]{b}{c}
-  \ncline[linewidth=0.5pt,linecolor=blue]{c}{d}
-  \ncline[linewidth=0.5pt,linecolor=blue]{d}{e}
-  \ncline[linewidth=0.5pt,linecolor=blue]{e}{f}
-  \ncline[linewidth=0.5pt,linecolor=blue]{f}{a}
-  \ncline[linewidth=0.5pt,linecolor=blue]{b}{e}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{a}{b}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{b}{c}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{c}{d}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{d}{e}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{e}{f}
-  \ncline[linewidth=0.5pt,offset=3pt]{->}{f}{a}
-  \endpspicture
-}
+  \node [point,label={[label distance=0pt]90:{$u_1$}}] at (2,6) (1) {};
+  \node [point,label={[label distance=0pt]90:{$u_2$}}] at (5,9) (1) {};
+  %
+  \node[point] at (4,5) (a) {};
+  \node[point] at (4,7) (b) {};
+  \node[point] at (5,8) (c) {};
+  \node[point] at (5,4) (f) {};
+  \node[point] at (5,6) (e) {};
+  \node[point] at (6,7) (d) {};
+  \draw[blue] (a)--(b);
+  \draw[blue] (b)--(c);
+  \draw[blue] (c)--(d);
+  \draw[blue] (d)--(e);
+  \draw[blue] (e)--(f);
+  \draw[blue] (f)--(a);
+  \draw[blue] (b)--(e);
+  \path [halfedge] (a) edge (b);
+  \path [halfedge] (b) edge (c);
+  \path [halfedge] (c) edge (d);
+  \path [halfedge] (d) edge (e);
+  \path [halfedge] (e) edge (f);
+  \path [halfedge] (f) edge (a);
+\end{tikzpicture}%
 \end{document}
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/bezier_curves.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/bezier_curves.tex
index e0013b99d728..6266e6524d04 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/bezier_curves.tex
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/bezier_curves.tex
@@ -2,7 +2,7 @@
 \input{header}
 \pagestyle{empty}
 \begin{document}
-\psscalebox{1.8}{\arrset{1}%
+\psscalebox{1}{\arrset{1}%
 \def\bodyBezier{
 \psline[linecolor=blue](2295,5175)(2492.01,5062.83)(2677.89,4983.16)(2854.44,4929.86)(3023.31,4897.62)(3185.98,4881.79)(3343.77,4878.41)(3497.83,4884.1)(3649.2,4896.04)(3798.76,4911.9)(3947.28,4929.78)(4095.39,4948.19)(4243.63,4965.94)(4392.4,4982.15)(4542.04,4996.13)(4692.77,5007.39)(4844.74,5015.54)(4998.01,5020.26)(5152.6,5021.23)(5308.42,5018.09)(5465.37,5010.38)(5623.29,4997.49)(5781.96,4978.58)(5941.15,4952.58)(6100.6,4918.08)(6260.03,4873.33)(6419.14,4816.11)(6577.65,4743.77)(6735.25,4653.1)(6891.68,4540.32)(7046.68,4400.99)(7200,4230)
 \psline[linecolor=blue](8460,6165)(8622.25,6003.86)(8725.83,5853.19)(8782.58,5711.47)(8802.7,5577.35)(8794.88,5449.63)(8766.41,5327.29)(8723.29,5209.44)(8670.37,5095.32)(8611.44,4984.3)(8549.35,4875.84)(8486.17,4769.53)(8423.24,4665.02)(8361.36,4562.04)(8300.84,4460.4)(8241.66,4359.96)(8183.58,4260.61)(8126.25,4162.29)(8069.34,4064.94)(8012.64,3968.53)(7956.2,3873.02)(7900.41,3778.35)(7846.17,3684.44)(7794.97,3591.19)(7749.02,3498.44)(7711.36,3405.97)(7685.99,3313.49)(7677.98,3220.65)(7693.59,3127)(7740.38,3031.97)(7827.34,2934.9)(7965,2835)
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/header.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/header.tex
index b75164d2a5cb..26980faab6f0 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/header.tex
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/header.tex
@@ -43,10 +43,25 @@
 \usepackage{tikz}
 \usepackage{pgfplots}
 \usepackage{mathptmx}
-\usetikzlibrary{calc,patterns,decorations.pathmorphing,decorations.markings,matrix,fit,decorations.pathreplacing,arrows,automata,positioning,shapes,chains,spy}
-%\usetikzlibrary{quotes,angles,graph}
-\usetikzlibrary{intersections,through,backgrounds}
+\usetikzlibrary{calc}
+\usetikzlibrary{backgrounds}
+\usetikzlibrary{decorations.pathmorphing}
+\usetikzlibrary{decorations.markings}
+\usetikzlibrary{decorations.pathreplacing}
+\usetikzlibrary{patterns}
+\usetikzlibrary{matrix}
+\usetikzlibrary{fit}
+\usetikzlibrary{arrows,arrows.meta}
+\usetikzlibrary{automata}
+\usetikzlibrary{positioning}
+\usetikzlibrary{shapes}
+\usetikzlibrary{chains}
+\usetikzlibrary{spy}
+\usetikzlibrary{intersections}
+\usetikzlibrary{through}
+\usetikzlibrary{cd}
 \usepackage{tikz-3dplot}
+%\usetikzlibrary{quotes,angles,graph}
 \tikzset{%
   invisible/.style={opacity=0},
   only/.code args={<#1>#2}{\only<#1>{\pgfkeysalso{#2}}},
@@ -54,8 +69,49 @@
   temporal/.code args={<#1>#2#3#4}{%
     \temporal<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}{\pgfkeysalso{#4}}},
   point/.style={circle,inner sep=1.5pt,minimum size=1.5pt,draw,fill=#1},
-  point/.default=red
+  point/.default=red,
+  halfedge/.style={-{Stealth[left,scale=1.5]},commutative diagrams/shift left=#1},
+  halfedge/.default=3pt
 }
+% ------------------------------------------------------------------------------
+% #1 half length of tick
+% #2 min x
+% #3 min y
+% #4 max x
+% #5 max y
+\NewDocumentCommand{\myAxes}{O{4pt}mmmmO{0.001}}{%
+  %axis
+  \draw[-{Stealth[scale=1.5]}] (#2,0)--(#4,0);
+  \draw[-{Stealth[scale=1.5]}] (0,#3)--(0,#5);
+  %ticks
+  \pgfmathtruncatemacro{\xs}{int(#2)};
+  \pgfmathtruncatemacro{\xe}{int(#4-#6)};
+  \pgfmathtruncatemacro{\ys}{int(#3)};
+  \pgfmathtruncatemacro{\ye}{int(#5-#6)};
+  \foreach \x in {\xs,...,\xe} \draw (\x,#1)--(\x,-#1);
+  \foreach \y in {\ys,...,\ye} \draw (#1,\y)--(-#1,\y);%
+}
+% ------------------------------------------------------------------------------
+%Syntax: [draw options] (center) (initial angle:final angle:radius)
+\def\centerarc[#1](#2)(#3:#4:#5){\draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5)}
+% ------------------------------------------------------------------------------
+\def\arrCrossVertexZ(#1)#2#3{\node[cross=#3] at (#1) (#2) {};}
+\def\arrQueryVertexZ(#1)#2{\arrCrossVertexZ(#1){#2}{red}}
+\def\arrCrossLabeledVertexZ[#1](#2)#3#4#5{\node [cross=#5,label={[label distance=-3pt]#1:{#4}}] at (#2) (#3) {};}
+\def\arrQueryLabeledVertexZ[#1](#2)#3#4{\arrCrossLabeledVertexZ[#1](#2){#3}{#4}{red}}
+%
+\def\arrColorVertexZ(#1)#2#3{\node[point=#3] at (#1) (#2) {};}
+\def\arrMinorVertexZ(#1)#2{\arrColorVertexZ(#1){#2}{cyan}}
+\def\arrMainVertexZ(#1)#2{\arrColorVertexZ(#1){#2}{red}}
+\def\arrIntersectionVertexZ(#1)#2{\arrColorVertexZ(#1){#2}{white}}
+\def\arrColoredLabeledVertexZ[#1](#2)#3#4#5{\node [point=#5,label={[label distance=-3pt]#1:{#4}}] at (#2) (#3) {};}
+\def\arrMainLabeledVertexZ[#1](#2)#3#4{\arrColoredLabeledVertexZ[#1](#2){#3}{#4}{red}}
+\def\arrMinorLabeledVertexZ[#1](#2)#3#4{\arrColoredLabeledVertexZ[#1](#2){#3}{#4}{cyan}}
+% ------------------------------------------------------------------------------
+\def\arrvZ[#1](#2)#3{\arrColoredLabeledVertexZ[#1](#2){#3}{$v_{#3}$}{red}}
+\def\arruZ[#1](#2)#3{\arrColoredLabeledVertexZ[#1](#2){#3}{$u_{#3}$}{red}}
+\def\arrpZ[#1](#2)#3{\arrColoredLabeledVertexZ[#1](#2){#3}{$p_{#3}$}{red}}
+% ==============================================================================
 \makeatletter
 \def\nodesDef{\@ifnextchar[{\@nodesDefWith}{\@nodesDefWithout}}
 \def\@nodesDefWith[#1]#2{\foreach \c in #2 { \node[point=#1] (n\c) at (\c) {}; }}
@@ -81,6 +137,7 @@
 % \usepackage{picins}
 \usepackage[absolute,overlay]{textpos}
 \usepackage{ifthen}
+\usepackage{xparse}
 \usepackage{etoolbox}
 %
 
diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/insert.tex b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/insert.tex
index 44f58b9c38a4..060f751f1335 100644
--- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/insert.tex
+++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/fig_src/insert.tex
@@ -2,96 +2,92 @@
 \input{header}
 \pagestyle{empty}
 \begin{document}
-\psscalebox{1.8}{\arrset{0.5}%
-  \begin{tabular}{ccc}
-    \pspicture[](0.5,0)(10,7)
-    \arrMainVertex(1,4){a}
-    \arrMainVertex(5,6){b}
-    \arrMainVertex(9,4){c}
-    \arrMainVertex(7,2){d}
-    \arrMainVertex(3,1){e}
-    \arrMainVertex(3,2){f}
-    \ncline[linewidth=0.5pt,linecolor=blue]{a}{b}
-    \ncline[linewidth=0.5pt,linecolor=blue]{b}{c}
-    \ncline[linewidth=0.5pt,linecolor=blue]{c}{d}
-    \ncline[linewidth=0.5pt,linecolor=blue]{d}{e}
-    \ncline[linewidth=0.5pt,linecolor=blue]{e}{f}
-    \ncline[linewidth=0.5pt,linecolor=blue]{f}{a}
-    \arrMinorVertex(3,3){1}\uput[135]{0}(3,3){$v_1$}
-    \arrMinorVertex(6,4){2}\uput[-45]{0}(6,4){$v_2$}
-    \ncline[linestyle=dashed,linewidth=0.5pt,linecolor=blue]{1}{2}
-    \ncline[linewidth=0.5pt,offset=3pt]{->}{1}{2}
-    \ncline[linewidth=0.5pt,offset=3pt]{->}{2}{1}
-    \rput(5,5){$f$}
-    \psframe[linewidth=0.5pt](0.5,0)(10,7)
-    \endpspicture &
-    %
-    \pspicture[](0.5,0)(10,7)
-    \arrMainVertex(1,3){a}
-    \arrMainVertex(2,5){b}
-    \arrMainVertex(5,6){c}
-    \arrMainVertex(7,3){u}
-    \uput[180]{0}(7,3){$u$}
-    \arrMainVertex(5,1){e}
-    \arrMainVertex(3,2){f}
-    \arrMainVertex(2,1){g}
-    \ncline[linewidth=0.5pt,linecolor=blue]{a}{b}
-    \ncline[linewidth=0.5pt,linecolor=blue]{b}{c}
-    \ncline[linewidth=0.5pt,linecolor=blue]{c}{u}
-    \ncline[linewidth=0.5pt,linecolor=blue]{u}{e}
-    \ncline[linewidth=0.5pt,linecolor=blue]{e}{f}
-    \ncline[linewidth=0.5pt,linecolor=blue]{f}{g}
-    \ncline[linewidth=0.5pt,linecolor=blue]{g}{a}
-    \arrMinorVertex(9,4){v}
-    \uput[90]{0}(9,4){$v$}
-    \ncline[linestyle=dashed,linewidth=0.5pt,linecolor=blue]{u}{v}
-    \ncline[linestyle=dashed,linewidth=0.5pt,offset=3pt]{->}{c}{u}
-    \ncline[linestyle=dashed,linewidth=0.5pt,offset=3pt]{->}{u}{e}
-    \ncline[linewidth=0.5pt,offset=3pt]{->}{u}{v}
-    \ncline[linewidth=0.5pt,offset=3pt]{->}{v}{u}
-    \psframe[linewidth=0.5pt](0.5,0)(10,7)
-    \endpspicture &
-    %
-    \pspicture[](0.5,0)(10,7)
-    \arrMainVertex(1,3){a}
-    \arrMainVertex(2,6){b}
-    \arru[45](5,6){1}
-    \arru[-45](7,1){2}
-    \arrMainVertex(4,2){e}
-    \arrMainVertex(2,1){f}
-    \ncline[linewidth=0.5pt,linecolor=blue]{a}{b}
-    \ncline[linewidth=0.5pt,linecolor=blue]{b}{1}
-    \ncline[linestyle=dashed,linewidth=0.5pt,offset=3pt]{->}{b}{1}
-    \ncline[linestyle=dashed,linewidth=0.5pt,offset=3pt]{->}{1}{b}
-    \ncline[linestyle=dashed,linewidth=0.5pt,linecolor=blue]{1}{2}
-    \ncline[linewidth=0.5pt,offset=3pt]{->}{1}{2}
-    \ncline[linewidth=0.5pt,offset=3pt,nodesepA=6pt]{->}{2}{1}
-    \ncline[linewidth=0.5pt,linecolor=blue]{2}{e}
-    \ncline[linestyle=dashed,linewidth=0.5pt,offset=3pt]{->}{2}{e}
-    \ncline[linestyle=dashed,linewidth=0.5pt,offset=3pt,nodesepB=4pt]{->}{e}{2}
-    \ncline[linewidth=0.5pt,linecolor=blue]{e}{f}
-    \ncline[linewidth=0.5pt,linecolor=blue]{f}{a}
-    \arrMainVertex(2.5,4){a}
-    \arrMainVertex(3.5,5){b}
-    \arrMainVertex(4.5,4){c}
-    \arrMainVertex(3.5,3){d}
-    \ncline[linewidth=0.5pt,linecolor=blue]{a}{b}
-    \ncline[linewidth=0.5pt,linecolor=blue]{b}{c}
-    \ncline[linewidth=0.5pt,linecolor=blue]{c}{d}\Aput[1pt]{$h_1$}
-    \ncline[linewidth=0.5pt,linecolor=blue]{d}{a}
-    \ncline[linewidth=0.5pt,linecolor=blue]{a}{c}
-    \rput(1,5){$f$}
-    \rput(2.5,5){$f'$}
-    \arrMainVertex(7,4){a}
-    \arrMainVertex(8,4){b}
-    \arrMainVertex(8,5){c}
-    \arrMainVertex(9,3){d}
-    \ncline[linewidth=0.5pt,linecolor=blue]{a}{b}
-    \ncline[linewidth=0.5pt,linecolor=blue]{b}{c}
-    \ncline[linewidth=0.5pt,linecolor=blue]{c}{a}
-    \ncline[linewidth=0.5pt,linecolor=blue]{b}{d}\Aput[1pt]{$h_2$}
-    \psframe[linewidth=0.5pt](0.5,0)(10,7)
-    \endpspicture
-  \end{tabular}
-}
+\begin{tabular}{ccc}
+  \begin{tikzpicture}
+    \node[point] at (1,4) (a) {};
+    \node[point] at (5,6) (b) {};
+    \node[point] at (9,4) (c) {};
+    \node[point] at (7,2) (d) {};
+    \node[point] at (3,1) (e) {};
+    \node[point] at (3,2) (f) {};
+    \draw[blue,very thick](a)--(b);
+    \draw[blue,very thick](b)--(c);
+    \draw[blue,very thick](c)--(d);
+    \draw[blue,very thick](d)--(e);
+    \draw[blue,very thick](e)--(f);
+    \draw[blue,very thick](f)--(a);
+    \node[point=cyan,label={[label distance=0pt]135:{$v_1$}}] at (3,3) (1) {};
+    \node[point=cyan,label={[label distance=0pt]135:{$v_2$}}] at (6,4) (2) {};
+    \draw[dashed,blue,very thick] (1)--(2);
+    \draw[halfedge] (1) to (2);
+    \draw[halfedge] (2) to (1);
+    \node at (5,5) {$f$};
+    \draw[thin](0.5,0) rectangle (10,7);
+  \end{tikzpicture} &
+  %
+  \begin{tikzpicture}
+    \node[point] at (1,3) (a) {};
+    \node[point] at (2,5) (b) {};
+    \node[point] at (5,6) (c) {};
+    \node[point,label={[label distance=0pt]180:{$u$}}] at (7,3) (u) {};
+    \node[point] at (5,1) (e) {};
+    \node[point] at (3,2) (f) {};
+    \node[point] at (2,1) (g) {};
+    \draw[blue,very thick](a)--(b);
+    \draw[blue,very thick](b)--(c);
+    \draw[blue,very thick](c)--(u);
+    \draw[blue,very thick](u)--(e);
+    \draw[blue,very thick](e)--(f);
+    \draw[blue,very thick](f)--(g);
+    \draw[blue,very thick](g)--(a);
+    \node[point=cyan,label={[label distance=0pt]90:{$v$}}] at (9,4) (v) {};
+    \draw[dashed,blue,very thick] (u)--(v);
+    \draw[dashed,halfedge] (c) to (u);
+    \draw[dashed,halfedge] (u) to (e);
+    \draw[halfedge] (u) to (v);
+    \draw[halfedge] (v) to (u);
+    \draw[thin] (0.5,0) rectangle (10,7);
+  \end{tikzpicture} &
+  %
+  \begin{tikzpicture}
+    \node[point] at (1,3) (a) {};
+    \node[point] at (2,6) (b) {};
+    \node[point,label={[label distance=0pt]45:{$u_1$}}] at (5,6) (1) {};
+    \node[point,label={[label distance=0pt]45:{$u_2$}}] at (7,1) (2) {};
+    \node[point] at (4,2) (e) {};
+    \node[point] at (2,1) (f) {};
+    \draw[blue,very thick](a)--(b);
+    \draw[blue,very thick](b)--(1);
+    \draw[dashed,thick,halfedge] (b) to (1);
+    \draw[dashed,thick,halfedge] (1) to (b);
+    \draw[dashed,blue,very thick](1)--(2);
+    \draw[thick,halfedge] (1) to (2);
+    \draw[thick,halfedge,shorten <=4pt] (2) to (1);
+    \draw[blue,very thick] (2)--(e);
+    \draw[dashed,halfedge] (2) to (e);
+    \draw[dashed,halfedge,shorten >=4pt] (e) to (2);
+    \draw[blue,very thick] (e)--(f);
+    \draw[blue,very thick] (f)--(a);
+    \node[point] at (2.5,4) (a) {};
+    \node[point] at (3.5,5) (b) {};
+    \node[point] at (4.5,4) (c) {};
+    \node[point] at (3.5,3) (d) {};
+    \draw[blue,very thick](a)--(b);
+    \draw[blue,very thick](b)--(c);
+    \draw[blue,very thick](c)-- node[midway,below,sloped] {$h_1$} (d);
+    \draw[blue,very thick](d)--(a);
+    \draw[blue,very thick](a)--(c);
+    \node at (1,5) {$f$};
+    \node at (2.5,5) {$f'$};
+    \node[point] at (7,4) (a) {};
+    \node[point] at (8,4) (b) {};
+    \node[point] at (8,5) (c) {};
+    \node[point] at (9,3) (d) {};
+    \draw[blue,very thick] (a)--(b);
+    \draw[blue,very thick] (b)--(c);
+    \draw[blue,very thick] (c)--(a);
+    \draw[blue,very thick] (b)-- node[midway,below,sloped] {$h_2$} (d);
+    \draw[thin] (0.5,0) rectangle (10,7);
+  \end{tikzpicture}
+\end{tabular}
 \end{document}

From 4324b71e506812a789b8ce3bbebc1fea1256fb4a Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Wed, 1 Nov 2023 18:11:51 +0200
Subject: [PATCH 07/12] Replaced 'typedef' with 'using'

---
 .../Arrangement_on_surface_2/Edge_length.h    | 12 +++---
 .../Extended_face_property_map.h              | 10 ++---
 .../Overlay_color_traits.h                    | 14 +++----
 .../algebraic_curves.cpp                      |  8 ++--
 .../algebraic_segments.cpp                    | 18 ++++----
 .../Arrangement_on_surface_2/arr_Bezier.h     | 24 +++++------
 .../Arrangement_on_surface_2/arr_circular.h   | 22 +++++-----
 .../arr_exact_construction_segments.h         | 24 +++++------
 .../arr_geodesic_on_sphere.h                  | 27 ++++++------
 .../arr_inexact_construction_segments.h       | 18 ++++----
 .../Arrangement_on_surface_2/arr_linear.h     | 30 ++++++-------
 .../Arrangement_on_surface_2/arr_polylines.h  | 16 +++----
 .../arr_rat_functions.h                       | 14 +++----
 .../batched_point_location.cpp                |  4 +-
 .../bgl_dual_adapter.cpp                      | 12 +++---
 .../bgl_primal_adapter.cpp                    |  4 +-
 .../bounded_vertical_decomposition.cpp        |  6 +--
 .../circular_line_arcs.cpp                    | 28 ++++++-------
 .../conic_multiplicities.cpp                  |  2 +-
 .../consolidated_curve_data.cpp               |  8 ++--
 .../curve_history.cpp                         |  6 +--
 .../dcel_extension.cpp                        |  4 +-
 .../dcel_extension_io.cpp                     |  6 +--
 .../dual_with_data.cpp                        |  6 +--
 .../edge_manipulation_curve_history.cpp       |  6 +--
 .../face_extension.cpp                        |  4 +-
 .../face_extension_overlay.cpp                | 11 +++--
 .../generic_curve_data.cpp                    | 12 +++---
 .../incremental_insertion.cpp                 |  4 +-
 .../Arrangement_on_surface_2/integer_type.h   |  6 +--
 .../io_curve_history.cpp                      |  2 +-
 .../overlay_color.cpp                         |  6 +--
 .../overlay_unbounded.cpp                     | 18 ++++----
 .../point_location.cpp                        |  4 +-
 .../point_location_utils.h                    | 30 ++++++-------
 .../polycurve_bezier.cpp                      | 10 ++---
 .../polycurve_circular_arc.cpp                | 10 ++---
 .../polycurve_conic.cpp                       |  8 ++--
 .../polycurve_geodesic.cpp                    | 41 +++++++++---------
 .../polycurves_basic.cpp                      | 16 +++----
 .../predefined_kernel_non_intersecting.cpp    | 24 +++++------
 ...tional_functions_rational_coefficients.cpp | 17 ++++----
 .../sgm_point_location.cpp                    | 42 +++++++++----------
 .../spherical_degenerate_sweep.cpp            | 29 +++++++------
 .../spherical_insert.cpp                      | 13 +++---
 .../spherical_overlay.cpp                     |  2 +-
 .../tracing_counting.cpp                      |  6 +--
 .../unb_planar_vertical_decomposition.cpp     | 12 +++---
 .../vertical_ray_shooting.cpp                 |  4 +-
 49 files changed, 326 insertions(+), 334 deletions(-)

diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Edge_length.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Edge_length.h
index 7ac8eb85dbc0..fe533d91c193 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Edge_length.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Edge_length.h
@@ -4,15 +4,15 @@
 #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
 #include <CGAL/property_map.h>
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-typedef Kernel::FT                                        Number_type;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Number_type = Kernel::FT;
 
 template <typename Arrangement> struct Edge_length {
   // Boost property-type definitions.
-  typedef boost::readable_property_map_tag      category;
-  typedef Number_type                           value_type;
-  typedef value_type                            reference;
-  typedef typename Arrangement::Halfedge_handle key_type;
+  using category = boost::readable_property_map_tag;
+  using value_type = Number_type;
+  using reference = value_type;
+  using key_type = typename Arrangement::Halfedge_handle;
 
   value_type operator()(typename Arrangement::Halfedge_handle e) const {
     const auto diff_x = e->target()->point().x() - e->source()->point().x();
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Extended_face_property_map.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Extended_face_property_map.h
index d85ce59f669d..e98b15799cf2 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Extended_face_property_map.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Extended_face_property_map.h
@@ -4,13 +4,13 @@
 // A property map that reads/writes the information to/from the extended face.
 template <typename Arrangement, class Type> class Extended_face_property_map {
 public:
-  typedef typename Arrangement::Face_handle       Face_handle;
+  using Face_handle = typename Arrangement::Face_handle;
 
   // Boost property type definitions.
-  typedef boost::read_write_property_map_tag      category;
-  typedef Type                                    value_type;
-  typedef value_type&                             reference;
-  typedef Face_handle                             key_type;
+  using category = boost::read_write_property_map_tag;
+  using value_type = Type;
+  using reference = value_type&;
+  using key_type = Face_handle;
 
   // The get function is required by the property map concept.
   friend reference get(const Extended_face_property_map& /* map */, key_type key)
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Overlay_color_traits.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Overlay_color_traits.h
index 66d31c7c6506..6c04c312cb4f 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Overlay_color_traits.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Overlay_color_traits.h
@@ -2,13 +2,13 @@
 #define OVERLAY_COLOR_TRAITS_H
 
 template <typename Arrangement> struct Overlay_color_traits {
-  typedef unsigned int                                  Color;
-  typedef typename Arrangement::Vertex_const_handle     V_const_handle;
-  typedef typename Arrangement::Halfedge_const_handle   H_const_handle;
-  typedef typename Arrangement::Face_const_handle       F_const_handle;
-  typedef typename Arrangement::Vertex_handle           V_handle;
-  typedef typename Arrangement::Halfedge_handle         H_handle;
-  typedef typename Arrangement::Face_handle             F_handle;
+  using Color = unsigned int;
+  using V_const_handle = typename Arrangement::Vertex_const_handle;
+  using H_const_handle = typename Arrangement::Halfedge_const_handle;
+  using F_const_handle = typename Arrangement::Face_const_handle;
+  using V_handle = typename Arrangement::Vertex_handle;
+  using H_handle = typename Arrangement::Halfedge_handle;
+  using F_handle = typename Arrangement::Face_handle;
 
   // Compute the average of the red, green, and blue components separately.
   Color blend(Color color1, Color color2) const
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_curves.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_curves.cpp
index 8d0a27ae5705..f8bc222897b7 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_curves.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_curves.cpp
@@ -21,10 +21,10 @@ int main ()
 #include "integer_type.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_algebraic_segment_traits_2<Integer> Traits;
-typedef CGAL::Arrangement_2<Traits>                   Arrangement;
-typedef Traits::Curve_2                               Curve;
-typedef Traits::Polynomial_2                          Polynomial;
+using Traits = CGAL::Arr_algebraic_segment_traits_2<Integer>;
+using Arrangement = CGAL::Arrangement_2<Traits>;
+using Curve = Traits::Curve_2;
+using Polynomial = Traits::Polynomial_2;
 
 int main() {
   CGAL::IO::set_pretty_mode(std::cout);             // for nice printouts.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp
index 69c4a66ea689..aba48b9f2224 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments.cpp
@@ -21,15 +21,15 @@ int main ()
 #include "integer_type.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_algebraic_segment_traits_2<Integer> Traits;
-typedef CGAL::Arrangement_2<Traits>                   Arrangement;
-typedef Traits::Curve_2                               Curve;
-typedef Traits::Polynomial_2                          Polynomial;
-typedef Traits::Algebraic_real_1                      Algebraic_real;
-typedef Traits::X_monotone_curve_2                    X_monotone_curve;
-typedef Traits::Point_2                               Point;
-
-typedef std::variant<Point, X_monotone_curve>       Make_x_monotone_result;
+using Traits = CGAL::Arr_algebraic_segment_traits_2<Integer>;
+using Arrangement = CGAL::Arrangement_2<Traits>;
+using Curve = Traits::Curve_2;
+using Polynomial = Traits::Polynomial_2;
+using Algebraic_real = Traits::Algebraic_real_1;
+using X_monotone_curve = Traits::X_monotone_curve_2;
+using Point = Traits::Point_2;
+
+using Make_x_monotone_result = std::variant<Point, X_monotone_curve>;
 
 int main() {
   Traits traits;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_Bezier.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_Bezier.h
index 30d978942c8d..b78d0192ca44 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_Bezier.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_Bezier.h
@@ -6,17 +6,17 @@
 #include <CGAL/Arr_Bezier_curve_traits_2.h>
 #include <CGAL/Arrangement_2.h>
 
-typedef CGAL::CORE_algebraic_number_traits              Nt_traits;
-typedef Nt_traits::Rational                             NT;
-typedef Nt_traits::Rational                             Rational;
-typedef Nt_traits::Algebraic                            Algebraic;
-typedef CGAL::Cartesian<Rational>                       Rat_kernel;
-typedef CGAL::Cartesian<Algebraic>                      Alg_kernel;
-typedef Rat_kernel::Point_2                             Rat_point;
-typedef CGAL::Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
-                                                        Traits;
-typedef Traits::X_monotone_curve_2                      Bezier_x_monotone_curve;
-typedef Traits::Curve_2                                 Bezier_curve;
-typedef CGAL::Arrangement_2<Traits>                     Arrangement;
+using Nt_traits = CGAL::CORE_algebraic_number_traits;
+using NT = Nt_traits::Rational;
+using Rational = Nt_traits::Rational;
+using Algebraic = Nt_traits::Algebraic;
+using Rat_kernel = CGAL::Cartesian<Rational>;
+using Alg_kernel = CGAL::Cartesian<Algebraic>;
+using Rat_point = Rat_kernel::Point_2;
+using Traits =
+  CGAL::Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel, Nt_traits>;
+using Bezier_x_monotone_curve = Traits::X_monotone_curve_2;
+using Bezier_curve = Traits::Curve_2;
+using Arrangement = CGAL::Arrangement_2<Traits>;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_circular.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_circular.h
index 752a1e84a2df..da88c3dfeb15 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_circular.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_circular.h
@@ -5,16 +5,16 @@
 #include <CGAL/Arr_circle_segment_traits_2.h>
 #include <CGAL/Arrangement_2.h>
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel  Kernel;
-typedef Kernel::FT                                         Number_type;
-typedef CGAL::Arr_circle_segment_traits_2<Kernel>          Traits;
-typedef Traits::CoordNT                                    CoordNT;
-typedef Traits::Point_2                                    Point;
-typedef Traits::Curve_2                                    Curve;
-typedef Traits::X_monotone_curve_2                         X_monotone_curve;
-typedef Traits::Rational_point_2                           Rational_point;
-typedef Traits::Rational_segment_2                         Segment;
-typedef Traits::Rational_circle_2                          Circle;
-typedef CGAL::Arrangement_2<Traits>                        Arrangement;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Number_type = Kernel::FT;
+using Traits = CGAL::Arr_circle_segment_traits_2<Kernel>;
+using CoordNT = Traits::CoordNT;
+using Point = Traits::Point_2;
+using Curve = Traits::Curve_2;
+using X_monotone_curve = Traits::X_monotone_curve_2;
+using Rational_point = Traits::Rational_point_2;
+using Segment = Traits::Rational_segment_2;
+using Circle = Traits::Rational_circle_2;
+using Arrangement = CGAL::Arrangement_2<Traits>;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_exact_construction_segments.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_exact_construction_segments.h
index 9a80ccddf386..8673bf88d2a8 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_exact_construction_segments.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_exact_construction_segments.h
@@ -5,19 +5,19 @@
 #include <CGAL/Arr_segment_traits_2.h>
 #include <CGAL/Arrangement_2.h>
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-typedef Kernel::FT                                        Number_type;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Number_type = Kernel::FT;
 
-typedef CGAL::Arr_segment_traits_2<Kernel>                Traits;
-typedef Traits::Point_2                                   Point;
-typedef Traits::X_monotone_curve_2                        Segment;
+using Traits = CGAL::Arr_segment_traits_2<Kernel>;
+using Point = Traits::Point_2;
+using Segment = Traits::X_monotone_curve_2;
 
-typedef CGAL::Arrangement_2<Traits>                       Arrangement;
-typedef Arrangement::Vertex_handle                        Vertex_handle;
-typedef Arrangement::Halfedge_handle                      Halfedge_handle;
-typedef Arrangement::Face_handle                          Face_handle;
-typedef Arrangement::Vertex_const_handle                  Vertex_const_handle;
-typedef Arrangement::Halfedge_const_handle                Halfedge_const_handle;
-typedef Arrangement::Face_const_handle                    Face_const_handle;
+using Arrangement = CGAL::Arrangement_2<Traits>;
+using Vertex_handle = Arrangement::Vertex_handle;
+using Halfedge_handle = Arrangement::Halfedge_handle;
+using Face_handle = Arrangement::Face_handle;
+using Vertex_const_handle = Arrangement::Vertex_const_handle;
+using Halfedge_const_handle = Arrangement::Halfedge_const_handle;
+using Face_const_handle = Arrangement::Face_const_handle;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_geodesic_on_sphere.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_geodesic_on_sphere.h
index 5223a580111e..295c43cde6cf 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_geodesic_on_sphere.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_geodesic_on_sphere.h
@@ -6,21 +6,20 @@
 #include <CGAL/Arr_geodesic_arc_on_sphere_traits_2.h>
 #include <CGAL/Arr_spherical_topology_traits_2.h>
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel  Kernel;
-typedef Kernel::FT                                         Number_type;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Number_type = Kernel::FT;
 
-typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>  Geom_traits;
-typedef Geom_traits::Point_2                               Point;
-typedef Geom_traits::X_monotone_curve_2                    X_monotone_curve;
-typedef CGAL::Arr_spherical_topology_traits_2<Geom_traits> Topol_traits;
-typedef CGAL::Arrangement_on_surface_2<Geom_traits, Topol_traits>
-                                                           Arrangement;
+using Geom_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+using Point = Geom_traits::Point_2;
+using X_monotone_curve = Geom_traits::X_monotone_curve_2;
+using Topol_traits = CGAL::Arr_spherical_topology_traits_2<Geom_traits>;
+using Arrangement = CGAL::Arrangement_on_surface_2<Geom_traits, Topol_traits>;
 
-typedef Arrangement::Vertex_handle                         Vertex_handle;
-typedef Arrangement::Halfedge_handle                       Halfedge_handle;
-typedef Arrangement::Face_handle                           Face_handle;
-typedef Arrangement::Vertex_const_handle                   Vertex_const_handle;
-typedef Arrangement::Halfedge_const_handle                 Halfedge_const_handle;
-typedef Arrangement::Face_const_handle                     Face_const_handle;
+using Vertex_handle = Arrangement::Vertex_handle;
+using Halfedge_handle = Arrangement::Halfedge_handle;
+using Face_handle = Arrangement::Face_handle;
+using Vertex_const_handle = Arrangement::Vertex_const_handle;
+using Halfedge_const_handle = Arrangement::Halfedge_const_handle;
+using Face_const_handle = Arrangement::Face_const_handle;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h
index d38181e0f330..a6c2f4d9d8c0 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_inexact_construction_segments.h
@@ -5,16 +5,16 @@
 #include <CGAL/Arr_non_caching_segment_traits_2.h>
 #include <CGAL/Arrangement_2.h>
 
-typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
-typedef Kernel::FT                                          Number_type;
+using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
+using Number_type = Kernel::FT;
 
-typedef CGAL::Arr_non_caching_segment_traits_2<Kernel>      Traits;
-typedef Traits::Point_2                                     Point;
-typedef Traits::X_monotone_curve_2                          Segment;
+using Traits = CGAL::Arr_non_caching_segment_traits_2<Kernel>;
+using Point = Traits::Point_2;
+using Segment = Traits::X_monotone_curve_2;
 
-typedef CGAL::Arrangement_2<Traits>                         Arrangement;
-typedef Arrangement::Vertex_handle                          Vertex_handle;
-typedef Arrangement::Halfedge_handle                        Halfedge_handle;
-typedef Arrangement::Face_handle                            Face_handle;
+using Arrangement = CGAL::Arrangement_2<Traits>;
+using Vertex_handle = Arrangement::Vertex_handle;
+using Halfedge_handle = Arrangement::Halfedge_handle;
+using Face_handle = Arrangement::Face_handle;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_linear.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_linear.h
index 8dad9c70f593..d30ad3ae4dbd 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_linear.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_linear.h
@@ -5,22 +5,22 @@
 #include <CGAL/Arr_linear_traits_2.h>
 #include <CGAL/Arrangement_2.h>
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-typedef Kernel::FT                                        Number_type;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Number_type = Kernel::FT;
 
-typedef CGAL::Arr_linear_traits_2<Kernel>                 Traits;
-typedef Traits::Point_2                                   Point;
-typedef Traits::Segment_2                                 Segment;
-typedef Traits::Ray_2                                     Ray;
-typedef Traits::Line_2                                    Line;
-typedef Traits::X_monotone_curve_2                        X_monotone_curve;
+using Traits = CGAL::Arr_linear_traits_2<Kernel>;
+using Point = Traits::Point_2;
+using Segment = Traits::Segment_2;
+using Ray = Traits::Ray_2;
+using Line = Traits::Line_2;
+using X_monotone_curve = Traits::X_monotone_curve_2;
 
-typedef CGAL::Arrangement_2<Traits>                       Arrangement;
-typedef Arrangement::Vertex_handle                        Vertex_handle;
-typedef Arrangement::Halfedge_handle                      Halfedge_handle;
-typedef Arrangement::Face_handle                          Face_handle;
-typedef Arrangement::Vertex_const_handle                  Vertex_const_handle;
-typedef Arrangement::Halfedge_const_handle                Halfedge_const_handle;
-typedef Arrangement::Face_const_handle                    Face_const_handle;
+using Arrangement = CGAL::Arrangement_2<Traits>;
+using Vertex_handle = Arrangement::Vertex_handle;
+using Halfedge_handle = Arrangement::Halfedge_handle;
+using Face_handle = Arrangement::Face_handle;
+using Vertex_const_handle = Arrangement::Vertex_const_handle;
+using Halfedge_const_handle = Arrangement::Halfedge_const_handle;
+using Face_const_handle = Arrangement::Face_const_handle;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_polylines.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_polylines.h
index 710f3f05f8b2..97f0413c5216 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_polylines.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_polylines.h
@@ -6,14 +6,14 @@
 #include <CGAL/Arr_polyline_traits_2.h>
 #include <CGAL/Arrangement_2.h>
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-typedef Kernel::FT                                        Number_type;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Number_type = Kernel::FT;
 
-typedef CGAL::Arr_segment_traits_2<Kernel>                Segment_traits;
-typedef CGAL::Arr_polyline_traits_2<Segment_traits>       Traits;
-typedef Traits::Point_2                                   Point;
-typedef Traits::Segment_2                                 Segment;
-typedef Traits::Curve_2                                   My_polyline;
-typedef CGAL::Arrangement_2<Traits>                       Arrangement;
+using Segment_traits = CGAL::Arr_segment_traits_2<Kernel>;
+using Traits = CGAL::Arr_polyline_traits_2<Segment_traits>;
+using Point = Traits::Point_2;
+using Segment = Traits::Segment_2;
+using My_polyline = Traits::Curve_2;
+using Arrangement = CGAL::Arrangement_2<Traits>;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_rat_functions.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_rat_functions.h
index 79abccb062ca..f3d42944e805 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_rat_functions.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_rat_functions.h
@@ -7,14 +7,14 @@
 #include <CGAL/Arr_rational_function_traits_2.h>
 #include <CGAL/Arrangement_2.h>
 
-typedef CORE::BigInt                               Number_type;
-typedef CGAL::Algebraic_kernel_d_1<Number_type>    AK1;
-typedef CGAL::Arr_rational_function_traits_2<AK1>  Traits;
+using Number_type = CORE::BigInt;
+using AK1 = CGAL::Algebraic_kernel_d_1<Number_type>;
+using Traits = CGAL::Arr_rational_function_traits_2<AK1>;
 
-typedef Traits::Polynomial_1                       Polynomial;
-typedef Traits::Algebraic_real_1                   Alg_real;
-typedef Traits::Bound                              Bound;
+using Polynomial = Traits::Polynomial_1;
+using Alg_real = Traits::Algebraic_real_1;
+using Bound = Traits::Bound;
 
-typedef CGAL::Arrangement_2<Traits>                Arrangement;
+using Arrangement = CGAL::Arrangement_2<Traits>;
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_location.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_location.cpp
index f2cbc29815d4..a88e118f38c0 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_location.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_location.cpp
@@ -10,8 +10,8 @@
 #include "arr_inexact_construction_segments.h"
 #include "point_location_utils.h"
 
-typedef CGAL::Arr_point_location_result<Arrangement>    Point_location_result;
-typedef std::pair<Point, Point_location_result::Type>   Query_result;
+using Point_location_result = CGAL::Arr_point_location_result<Arrangement>;
+using Query_result = std::pair<Point, Point_location_result::Type>;
 
 int main() {
   // Construct the arrangement.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
index d059facf8f95..3d0f0b65c314 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp
@@ -15,12 +15,12 @@
 #include "arr_exact_construction_segments.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_face_extended_dcel<Traits, unsigned int> Dcel;
-typedef CGAL::Arrangement_2<Traits, Dcel>                  Ex_arrangement;
-typedef CGAL::Dual<Ex_arrangement>                         Dual_arrangement;
-typedef CGAL::Arr_face_index_map<Ex_arrangement>           Face_index_map;
-typedef Extended_face_property_map<Ex_arrangement,unsigned int>
-                                                           Face_property_map;
+using Dcel = CGAL::Arr_face_extended_dcel<Traits, unsigned int>;
+using Ex_arrangement = CGAL::Arrangement_2<Traits, Dcel>;
+using Dual_arrangement = CGAL::Dual<Ex_arrangement>;
+using Face_index_map = CGAL::Arr_face_index_map<Ex_arrangement>;
+using Face_property_map =
+  Extended_face_property_map<Ex_arrangement,unsigned int>;
 
 int main() {
   // Construct an arrangement of seven intersecting line segments.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
index 163125c0e3df..e7d6720af5db 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp
@@ -15,8 +15,8 @@
 #include "arr_exact_construction_segments.h"
 #include "Edge_length.h"
 
-typedef CGAL::Arr_vertex_index_map<Arrangement>  Vertex_index_map;
-typedef Edge_length<Arrangement>                 My_edge_length;
+using Vertex_index_map = CGAL::Arr_vertex_index_map<Arrangement>;
+using My_edge_length = Edge_length<Arrangement>;
 
 int main() {
   // Construct an arrangement of seven intersecting line segments.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_vertical_decomposition.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_vertical_decomposition.cpp
index 3f1403ecebdb..77137ced4873 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_vertical_decomposition.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_vertical_decomposition.cpp
@@ -8,9 +8,9 @@
 
 #include "arr_exact_construction_segments.h"
 
-typedef std::pair<CGAL::Object, CGAL::Object>           Object_pair;
-typedef std::pair<Vertex_const_handle, Object_pair>     Vert_decomp_entry;
-typedef std::list<Vert_decomp_entry>                    Vert_decomp_list;
+using Object_pair = std::pair<CGAL::Object, CGAL::Object>;
+using Vert_decomp_entry = std::pair<Vertex_const_handle, Object_pair>;
+using Vert_decomp_list = std::list<Vert_decomp_entry>;
 
 int main() {
   // Construct the arrangement.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp
index 750986dda1eb..0d3e8cc3d169 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs.cpp
@@ -15,23 +15,23 @@
 #include <CGAL/Random.h>
 
 
-typedef CGAL::Quotient<CGAL::MP_Float>                      NT;
-typedef CGAL::Cartesian<NT>                                 Linear_k;
-typedef CGAL::Algebraic_kernel_for_circles_2_2<NT>          Algebraic_k;
-typedef CGAL::Circular_kernel_2<Linear_k,Algebraic_k>       Circular_k;
+using NT = CGAL::Quotient<CGAL::MP_Float>;
+using Linear_k = CGAL::Cartesian<NT>;
+using Algebraic_k = CGAL::Algebraic_kernel_for_circles_2_2<NT>;
+using Circular_k = CGAL::Circular_kernel_2<Linear_k,Algebraic_k>;
 
-typedef Circular_k::Point_2                                 Point_2;
-typedef Circular_k::Circle_2                                Circle_2;
-typedef Circular_k::Circular_arc_2                          Circular_arc_2;
-typedef Circular_k::Line_arc_2                              Line_arc_2;
+using Point_2 = Circular_k::Point_2;
+using Circle_2 = Circular_k::Circle_2;
+using Circular_arc_2 = Circular_k::Circular_arc_2;
+using Line_arc_2 = Circular_k::Line_arc_2;
 
-typedef std::variant< Circular_arc_2, Line_arc_2>         Arc_2;
-typedef std::vector< Arc_2>                                 ArcContainer;
+using Arc_2 = std::variant< Circular_arc_2, Line_arc_2>;
+using ArcContainer = std::vector< Arc_2>;
 
-typedef CGAL::Arr_circular_line_arc_traits_2<Circular_k>    Traits;
+using Traits = CGAL::Arr_circular_line_arc_traits_2<Circular_k>;
 
-typedef CGAL::Arrangement_2<Traits>                         Arrangement;
-typedef CGAL::Arr_naive_point_location<Arrangement>         Point_location;
+using Arrangement = CGAL::Arrangement_2<Traits>;
+using Point_location = CGAL::Arr_naive_point_location<Arrangement>;
 
 int main() {
   CGAL::Random generatorOfgenerator;
@@ -46,7 +46,7 @@ int main() {
   for (int i = 0; i < 10; i++) {
     x1 = theRandom.get_int(random_min,random_max);
     y1 = theRandom.get_int(random_min,random_max);
-    do{
+    do {
       x2 = theRandom.get_int(random_min,random_max);
       y2 = theRandom.get_int(random_min,random_max);
     } while((x1 == x2) && (y1 == y2));
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conic_multiplicities.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conic_multiplicities.cpp
index 752f6e21f9dd..5eaccf5db9ef 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conic_multiplicities.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conic_multiplicities.cpp
@@ -11,7 +11,7 @@
 #include "arr_conics.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_naive_point_location<Arrangement>             Naive_pl;
+using Naive_pl = CGAL::Arr_naive_point_location<Arrangement>;
 
 int main() {
   Traits traits;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
index 2bb6b9084758..55ea5aada147 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp
@@ -9,10 +9,10 @@
 
 enum Segment_color {RED, BLUE};
 
-typedef CGAL::Arr_consolidated_curve_data_traits_2<Traits, Segment_color>
-                                                           Data_traits;
-typedef Data_traits::Curve_2                               Colored_segment;
-typedef CGAL::Arrangement_2<Data_traits>                   Colored_arr;
+using Data_traits =
+  CGAL::Arr_consolidated_curve_data_traits_2<Traits, Segment_color>;
+using Colored_segment = Data_traits::Curve_2;
+using Colored_arr = CGAL::Arrangement_2<Data_traits>;
 
 int main() {
   Colored_arr arr;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/curve_history.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/curve_history.cpp
index 49fa78bff2bf..4a7b7a57bdb4 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/curve_history.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/curve_history.cpp
@@ -8,9 +8,9 @@
 #include "arr_exact_construction_segments.h"
 #include "point_location_utils.h"
 
-typedef CGAL::Arrangement_with_history_2<Traits>              Arr_with_hist;
-typedef Arr_with_hist::Curve_handle                           Curve_handle;
-typedef CGAL::Arr_trapezoid_ric_point_location<Arr_with_hist> Point_location;
+using Arr_with_hist = CGAL::Arrangement_with_history_2<Traits>;
+using Curve_handle = Arr_with_hist::Curve_handle;
+using Point_location = CGAL::Arr_trapezoid_ric_point_location<Arr_with_hist>;
 
 int main() {
   // Insert 3 curves incrementally.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp
index 3801d3126ae8..88140318fd22 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp
@@ -8,8 +8,8 @@
 
 enum Color {BLUE, RED, WHITE};
 
-typedef CGAL::Arr_extended_dcel<Traits, Color, bool, size_t> Dcel;
-typedef CGAL::Arrangement_2<Traits, Dcel>                    Ex_arrangement;
+using Dcel = CGAL::Arr_extended_dcel<Traits, Color, bool, size_t>;
+using Ex_arrangement = CGAL::Arrangement_2<Traits, Dcel>;
 
 int main() {
   // Construct the arrangement containing two intersecting triangles.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension_io.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension_io.cpp
index 2be07e6bf1bb..441e4f7b6cac 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension_io.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension_io.cpp
@@ -31,9 +31,9 @@ std::istream& operator>>(std::istream& is, Color& color) {
   return is;
 }
 
-typedef CGAL::Arr_extended_dcel<Traits, Color, bool, int>       Ext_dcel;
-typedef CGAL::Arrangement_2<Traits, Ext_dcel>                   Ext_arrangement;
-typedef CGAL::Arr_extended_dcel_text_formatter<Ext_arrangement> Formatter;
+using Ext_dcel = CGAL::Arr_extended_dcel<Traits, Color, bool, int>;
+using Ext_arrangement = CGAL::Arrangement_2<Traits, Ext_dcel>;
+using Formatter = CGAL::Arr_extended_dcel_text_formatter<Ext_arrangement>;
 
 int main() {
   // Construct the arrangement containing two intersecting triangles.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_with_data.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_with_data.cpp
index e81a00c5d58d..8ffb6688971e 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_with_data.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_with_data.cpp
@@ -10,9 +10,9 @@
 #include "arr_linear.h"
 #include "read_objects.h"
 
-typedef CGAL::Arr_curve_data_traits_2<Traits, size_t>   Data_traits;
-typedef Data_traits::X_monotone_curve_2                 Data_x_monotone_curve_2;
-typedef CGAL::Arrangement_2<Data_traits>                Data_arrangement;
+using Data_traits = CGAL::Arr_curve_data_traits_2<Traits, size_t>;
+using Data_x_monotone_curve_2 = Data_traits::X_monotone_curve_2;
+using Data_arrangement = CGAL::Arrangement_2<Data_traits>;
 
 int main(int argc, char* argv[]) {
   // Get the name of the input file from the command line, or use the default
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
index bd636bc94fe5..bf1d504d4f6b 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp
@@ -8,9 +8,9 @@
 #include "arr_circular.h"
 #include "arr_print.h"
 
-typedef CGAL::Arrangement_with_history_2<Traits>                Arr_with_hist;
-typedef Arr_with_hist::Curve_handle                             Curve_handle;
-typedef CGAL::Arr_walk_along_line_point_location<Arr_with_hist> Point_location;
+using Arr_with_hist = CGAL::Arrangement_with_history_2<Traits>;
+using Curve_handle = Arr_with_hist::Curve_handle;
+using Point_location = CGAL::Arr_walk_along_line_point_location<Arr_with_hist>;
 
 int main() {
   // Construct an arrangement containing nine circles: C[0] of radius 2 and
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp
index 5778412a8dc0..8befee7dafcf 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp
@@ -7,8 +7,8 @@
 
 #include "arr_exact_construction_segments.h"
 
-typedef CGAL::Arr_face_extended_dcel<Traits, size_t>       Dcel;
-typedef CGAL::Arrangement_2<Traits, Dcel>                  Ex_arrangement;
+using Dcel = CGAL::Arr_face_extended_dcel<Traits, size_t>;
+using Ex_arrangement = CGAL::Arrangement_2<Traits, Dcel>;
 
 // An arrangement observer, used to receive notifications of face splits and
 // to update the indices of the newly created faces.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension_overlay.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension_overlay.cpp
index 7eda7deea852..27459e6ff9e2 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension_overlay.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension_overlay.cpp
@@ -9,12 +9,11 @@
 
 #include "arr_exact_construction_segments.h"
 
-typedef CGAL::Arr_face_extended_dcel<Traits, bool>       Dcel;
-typedef CGAL::Arrangement_2<Traits, Dcel>                Ex_arrangement;
-typedef CGAL::Arr_face_overlay_traits<Ex_arrangement, Ex_arrangement,
-                                      Ex_arrangement,
-                                      std::logical_and<bool> >
-                                                         Overlay_traits;
+using Dcel = CGAL::Arr_face_extended_dcel<Traits, bool>;
+using Ex_arrangement = CGAL::Arrangement_2<Traits, Dcel>;
+using Overlay_traits =
+  CGAL::Arr_face_overlay_traits<Ex_arrangement, Ex_arrangement,
+                                Ex_arrangement, std::logical_and<bool>>;
 
 int main() {
   // Construct the first arrangement, containing a square-shaped face.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/generic_curve_data.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/generic_curve_data.cpp
index 5756885a48ee..72710580dee3 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/generic_curve_data.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/generic_curve_data.cpp
@@ -7,18 +7,18 @@
 
 #include "arr_polylines.h"
 
-typedef std::string Name;               // The name-field type.
+using Name = std::string;               // The name-field type.
 
 struct Merge_names {
   Name operator() (const Name& s1, const Name& s2) const
   { return (s1 + " " + s2); }
 };
 
-typedef CGAL::Arr_curve_data_traits_2<Traits, Name, Merge_names>
-                                                    Ex_traits;
-typedef Ex_traits::Curve_2                          Ex_polyline;
-typedef Ex_traits::X_monotone_curve_2               Ex_x_monotone_polyline;
-typedef CGAL::Arrangement_2<Ex_traits>              Ex_arrangement;
+using Ex_traits = CGAL::Arr_curve_data_traits_2<Traits, Name, Merge_names>;
+
+using Ex_polyline = Ex_traits::Curve_2;
+using Ex_x_monotone_polyline = Ex_traits::X_monotone_curve_2;
+using Ex_arrangement = CGAL::Arrangement_2<Ex_traits>;
 
 int main() {
   // Construct an arrangement of four polylines named A--D.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp
index 59a0203a4b45..857a5ecdf01d 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion.cpp
@@ -7,8 +7,8 @@
 #include "arr_exact_construction_segments.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_naive_point_location<Arrangement>             Naive_pl;
-typedef CGAL::Arr_point_location_result<Arrangement>::Type      Pl_result_type;
+using Naive_pl = CGAL::Arr_naive_point_location<Arrangement>;
+using Pl_result_type = CGAL::Arr_point_location_result<Arrangement>::Type;
 
 int main() {
   // Construct the arrangement of five intersecting segments.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/integer_type.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/integer_type.h
index 994567478152..b03f83fd832d 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/integer_type.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/integer_type.h
@@ -5,13 +5,13 @@
 
 #if CGAL_USE_GMP && CGAL_USE_MPFI
 #include <CGAL/Gmpz.h>
-typedef CGAL::Gmpz      Integer;
+using Integer = CGAL::Gmpz;
 #elif CGAL_USE_CORE
 #include <CGAL/CORE_BigInt.h>
-typedef CORE::BigInt    Integer;
+using Integer = CORE::BigInt;
 #else
 #include <CGAL/leda_integer.h>
-typedef LEDA::integer   Integer;
+using Integer = LEDA::integer;
 #endif
 
 #endif
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_curve_history.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_curve_history.cpp
index de866be3ada2..b62c6a93ff99 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_curve_history.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_curve_history.cpp
@@ -10,7 +10,7 @@
 #include "arr_exact_construction_segments.h"
 #include "arr_print.h"
 
-typedef CGAL::Arrangement_with_history_2<Traits>        Arr_with_hist;
+using Arr_with_hist = CGAL::Arrangement_with_history_2<Traits>;
 
 int main() {
   // Insert six additional segments aggregately:
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_color.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_color.cpp
index 6cb7f17f477b..42c7f69aaffc 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_color.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_color.cpp
@@ -11,9 +11,9 @@
 #include "arr_exact_construction_segments.h"
 #include "Overlay_color_traits.h"
 
-typedef unsigned int                                         Color;
-typedef CGAL::Arr_extended_dcel<Traits, Color, Color, Color> Dcel;
-typedef CGAL::Arrangement_2<Traits, Dcel>                    Ex_arrangement;
+using Color = unsigned int;
+using Dcel = CGAL::Arr_extended_dcel<Traits, Color, Color, Color>;
+using Ex_arrangement = CGAL::Arrangement_2<Traits, Dcel>;
 
 int main() {
   const Color vcol1(0x00000080), hcol1(0x000000ff), fcol1(0x00ccccff);
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp
index 866c66016d1d..40d06f4f712c 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp
@@ -16,15 +16,15 @@ struct Overlay_label {
   { return c + std::to_string(i); }
 };
 
-typedef CGAL::Arr_face_extended_dcel<Traits, char>         Dcel_dlue;
-typedef CGAL::Arrangement_2<Traits, Dcel_dlue>             Arrangement_blue;
-typedef CGAL::Arr_face_extended_dcel<Traits, unsigned int> Dcel_red;
-typedef CGAL::Arrangement_2<Traits, Dcel_red>              Arrangement_red;
-typedef CGAL::Arr_face_extended_dcel<Traits, std::string>  Dcel_res;
-typedef CGAL::Arrangement_2<Traits, Dcel_res>              Arrangement_res;
-typedef CGAL::Arr_face_overlay_traits<Arrangement_blue, Arrangement_red,
-                                      Arrangement_res, Overlay_label>
-                                                           Overlay_traits;
+using Dcel_dlue = CGAL::Arr_face_extended_dcel<Traits, char>;
+using Arrangement_blue = CGAL::Arrangement_2<Traits, Dcel_dlue>;
+using Dcel_red = CGAL::Arr_face_extended_dcel<Traits, unsigned int>;
+using Arrangement_red = CGAL::Arrangement_2<Traits, Dcel_red>;
+using Dcel_res = CGAL::Arr_face_extended_dcel<Traits, std::string>;
+using Arrangement_res = CGAL::Arrangement_2<Traits, Dcel_res>;
+using Overlay_traits =
+  CGAL::Arr_face_overlay_traits<Arrangement_blue, Arrangement_red,
+                                Arrangement_res, Overlay_label>;
 
 int main() {
   // Construct the first arrangement, induced by two lines y = x and y = -x.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location.cpp
index 31224d3363c8..8f9c0458d55e 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location.cpp
@@ -8,8 +8,8 @@
 #include "arr_inexact_construction_segments.h"
 #include "point_location_utils.h"
 
-typedef CGAL::Arr_naive_point_location<Arrangement>         Naive_pl;
-typedef CGAL::Arr_landmarks_point_location<Arrangement>     Landmarks_pl;
+using Naive_pl = CGAL::Arr_naive_point_location<Arrangement>;
+using Landmarks_pl = CGAL::Arr_landmarks_point_location<Arrangement>;
 
 int main() {
   // Construct the arrangement.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h
index d5a729edc6d9..8dd199fde072 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_utils.h
@@ -9,10 +9,10 @@ void print_point_location
 (const typename Arrangement_::Point_2& q,
  typename CGAL::Arr_point_location_result<Arrangement_>::Type obj)
 {
-  typedef Arrangement_                                  Arrangement_2;
-  typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
-  typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
-  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
+  using Arrangement_2 = Arrangement_;
+  using Vertex_const_handle = typename Arrangement_2::Vertex_const_handle;
+  using Halfedge_const_handle = typename Arrangement_2::Halfedge_const_handle;
+  using Face_const_handle = typename Arrangement_2::Face_const_handle;
 
   const Vertex_const_handle* v;
   const Halfedge_const_handle* e;
@@ -39,8 +39,8 @@ void locate_point(const PointLocation& pl,
                   const typename PointLocation::Arrangement_2::Point_2& q)
 {
   // Perform the point-location query.
-  typedef PointLocation                                 Point_location;
-  typedef typename Point_location::Arrangement_2        Arrangement_2;
+  using Point_location = PointLocation;
+  using Arrangement_2 = typename Point_location::Arrangement_2;
   typename CGAL::Arr_point_location_result<Arrangement_2>::Type obj =
     pl.locate(q);
 
@@ -56,16 +56,16 @@ void shoot_vertical_ray(const VerticalRayShooting& vrs,
                         const typename
                         VerticalRayShooting::Arrangement_2::Point_2& q)
 {
-  typedef VerticalRayShooting                           Vertical_ray_shooting;
+  using Vertical_ray_shooting = VerticalRayShooting;
 
   // Perform the point-location query.
   typename Vertical_ray_shooting::result_type obj = vrs.ray_shoot_up(q);
 
   // Print the result.
-  typedef typename Vertical_ray_shooting::Arrangement_2 Arrangement_2;
-  typedef typename Arrangement_2::Vertex_const_handle   Vertex_const_handle;
-  typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
-  typedef typename Arrangement_2::Face_const_handle     Face_const_handle;
+  using Arrangement_2 = typename Vertical_ray_shooting::Arrangement_2;
+  using Vertex_const_handle = typename Arrangement_2::Vertex_const_handle;
+  using Halfedge_const_handle = typename Arrangement_2::Halfedge_const_handle;
+  using Face_const_handle = typename Arrangement_2::Face_const_handle;
 
   const Vertex_const_handle* v;
   const Halfedge_const_handle* e;
@@ -94,10 +94,10 @@ void shoot_vertical_ray(const VerticalRayShooting& vrs,
 template <typename Arrangement_>
 void construct_segments_arr(Arrangement_& arr)
 {
-  typedef Arrangement_                                Arrangement_2;
-  typedef typename Arrangement_2::Point_2             Point_2;
-  typedef typename Arrangement_2::X_monotone_curve_2  Segment_2;
-  typedef typename Arrangement_2::Halfedge_handle     Halfedge_handle;
+  using Arrangement_2 = Arrangement_;
+  using Point_2 = typename Arrangement_2::Point_2;
+  using Segment_2 = typename Arrangement_2::X_monotone_curve_2;
+  using Halfedge_handle = typename Arrangement_2::Halfedge_handle;
 
   Point_2 p0(3,2), p1(0,3), p2(2,5), p3(4,5), p4(6,3), p5(3,0);
   Segment_2 s1(p1, p2), s2(p2, p3), s3(p3, p4), s4(p4, p5), s5(p5, p1);
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp
index 70184f7f4bb5..309a849e64bd 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_bezier.cpp
@@ -19,12 +19,12 @@ int main() {
 #include "arr_Bezier.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_polycurve_traits_2<Traits>            Polycurve_bezier_traits;
-typedef Polycurve_bezier_traits::Point_2                Point;
-typedef Polycurve_bezier_traits::X_monotone_curve_2     X_mono_polycurve;
-typedef CGAL::Arrangement_2<Polycurve_bezier_traits>    Arrangement_2;
+using Polycurve_bezier_traits = CGAL::Arr_polycurve_traits_2<Traits>;
+using Point = Polycurve_bezier_traits::Point_2;
+using X_mono_polycurve = Polycurve_bezier_traits::X_monotone_curve_2;
+using Arrangement_2 = CGAL::Arrangement_2<Polycurve_bezier_traits>;
 
-typedef std::variant<Point, Bezier_x_monotone_curve>  Make_x_monotone_result;
+using Make_x_monotone_result = std::variant<Point, Bezier_x_monotone_curve>;
 
 int main() {
   Polycurve_bezier_traits pc_traits;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp
index 00827b0da577..742473a79bfa 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp
@@ -22,11 +22,11 @@ int main() {
 #include "arr_circular.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_polycurve_traits_2<Traits>    Polycurve_traits;
-typedef Polycurve_traits::X_monotone_curve_2    X_monotone_polycurve;
-typedef Polycurve_traits::Curve_2               Polycurve;
-typedef Kernel::Circle_2                        Circle_2;
-typedef CGAL::Arrangement_2<Polycurve_traits>   Polycurve_circ_arc_arrangment;
+using Polycurve_traits = CGAL::Arr_polycurve_traits_2<Traits>;
+using X_monotone_polycurve = Polycurve_traits::X_monotone_curve_2;
+using Polycurve = Polycurve_traits::Curve_2;
+using Circle_2 = Kernel::Circle_2;
+using Polycurve_circ_arc_arrangment = CGAL::Arrangement_2<Polycurve_traits>;
 
 int main() {
   Polycurve_traits traits;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp
index 803a0696bd28..bdaafb9ebb0c 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp
@@ -21,10 +21,10 @@ int main() {
 #include "arr_conics.h"
 #include "arr_print.h"
 
-typedef CGAL::Arr_polycurve_traits_2<Traits>          Polycurve_conic_traits_2;
-typedef Polycurve_conic_traits_2::X_monotone_curve_2  X_monotone_polycurve;
-typedef Polycurve_conic_traits_2::Curve_2             Polycurve;
-typedef CGAL::Arrangement_2<Polycurve_conic_traits_2> Polycurve_conic_arrangment;
+using Polycurve_conic_traits_2 = CGAL::Arr_polycurve_traits_2<Traits>;
+using X_monotone_polycurve = Polycurve_conic_traits_2::X_monotone_curve_2;
+using Polycurve = Polycurve_conic_traits_2::Curve_2;
+using Polycurve_conic_arrangment = CGAL::Arrangement_2<Polycurve_conic_traits_2>;
 
 int main() {
   Traits sub_traits;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_geodesic.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_geodesic.cpp
index fdf6a5d0a5a7..008730bba159 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_geodesic.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_geodesic.cpp
@@ -10,31 +10,29 @@
 #include <CGAL/Arr_polyline_traits_2.h>
 #include <CGAL/Arrangement_on_surface_2.h>
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel    Kernel;
-typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>    Segment_traits_2;
-typedef CGAL::Arr_polyline_traits_2<Segment_traits_2>        Poly_traits_2;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Segment_traits_2 = CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+using Poly_traits_2 = CGAL::Arr_polyline_traits_2<Segment_traits_2>;
 
-typedef Poly_traits_2::Point_2                               Point_2;
-typedef Poly_traits_2::Curve_2                               Poly_curve_2;
-typedef Poly_traits_2::X_monotone_curve_2                    X_poly_curve_2;
-typedef CGAL::Arr_spherical_topology_traits_2<Poly_traits_2>
-  Topol_poly_traits_2;
-typedef CGAL::Arrangement_on_surface_2<Poly_traits_2, Topol_poly_traits_2>
-                                                             Poly_arr;
+using Point_2 = Poly_traits_2::Point_2;
+using Poly_curve_2 = Poly_traits_2::Curve_2;
+using X_poly_curve_2 = Poly_traits_2::X_monotone_curve_2;
+using Topol_poly_traits_2 =
+  CGAL::Arr_spherical_topology_traits_2<Poly_traits_2>;
+using Poly_arr =
+  CGAL::Arrangement_on_surface_2<Poly_traits_2, Topol_poly_traits_2>;
 
-typedef Segment_traits_2::Curve_2                            Seg_curve_2;
-typedef Segment_traits_2::X_monotone_curve_2                 X_seg_curve_2;
-typedef CGAL::Arr_spherical_topology_traits_2<Segment_traits_2>
-  Topol_segment_traits_2;
-typedef CGAL::Arrangement_on_surface_2<Segment_traits_2, Topol_segment_traits_2>
-                                                             Segment_arr;
+using Seg_curve_2 = Segment_traits_2::Curve_2;
+using X_seg_curve_2 = Segment_traits_2::X_monotone_curve_2;
+using Topol_segment_traits_2 =
+  CGAL::Arr_spherical_topology_traits_2<Segment_traits_2>;
+using Segment_arr =
+  CGAL::Arrangement_on_surface_2<Segment_traits_2, Topol_segment_traits_2>;
 
 int main() {
   Segment_traits_2 seg_traits;
-  Segment_traits_2::Construct_point_2 ctr_p =
-    seg_traits.construct_point_2_object();
-  Segment_traits_2::Construct_x_monotone_curve_2 ctr_seg =
-    seg_traits.construct_x_monotone_curve_2_object();
+  auto ctr_p = seg_traits.construct_point_2_object();
+  auto ctr_seg = seg_traits.construct_x_monotone_curve_2_object();
 
   Point_2 p1 = ctr_p(0, 1, -1);
   Point_2 p2 = ctr_p(-11, 7, -7);
@@ -62,8 +60,7 @@ int main() {
   points.push_back(p5);
 
   Poly_traits_2 poly_traits;
-  Poly_traits_2::Construct_x_monotone_curve_2 ctr =
-    poly_traits.construct_x_monotone_curve_2_object();
+  auto ctr = poly_traits.construct_x_monotone_curve_2_object();
   Poly_arr poly_arr(&poly_traits);
   insert(poly_arr, ctr(seg_cv1));
   insert(poly_arr, ctr(seg_cv2));
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurves_basic.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurves_basic.cpp
index 016c0ef74de5..90bfde3c0a00 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurves_basic.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurves_basic.cpp
@@ -10,14 +10,14 @@
 
 #include "arr_print.h"
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
-typedef CGAL::Arr_directional_non_caching_segment_basic_traits_2<Kernel>
-                                                            Subcurve_traits;
-typedef CGAL::Arr_polycurve_basic_traits_2<Subcurve_traits> Geom_traits;
-typedef Geom_traits::Point_2                                Point;
-typedef Subcurve_traits::X_monotone_curve_2                 X_monotone_subcurve;
-typedef Geom_traits::X_monotone_curve_2                     X_monotone_curve;
-typedef CGAL::Arrangement_2<Geom_traits>                    Arrangement;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Subcurve_traits =
+  CGAL::Arr_directional_non_caching_segment_basic_traits_2<Kernel>;
+using Geom_traits = CGAL::Arr_polycurve_basic_traits_2<Subcurve_traits>;
+using Point = Geom_traits::Point_2;
+using X_monotone_subcurve = Subcurve_traits::X_monotone_curve_2;
+using X_monotone_curve = Geom_traits::X_monotone_curve_2;
+using Arrangement = CGAL::Arrangement_2<Geom_traits>;
 
 int main() {
   Geom_traits traits;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
index 87b05dcbb15a..e4474ae57678 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
@@ -9,12 +9,12 @@
 #include <list>
 #include <fstream>
 
-typedef CGAL::Exact_predicates_inexact_constructions_kernel   Kernel;
-typedef Kernel::FT                                            Number_type;
-typedef CGAL::Arr_non_caching_segment_basic_traits_2<Kernel>  Traits_2;
-typedef Traits_2::Point_2                                     Point_2;
-typedef Traits_2::X_monotone_curve_2                          Segment_2;
-typedef CGAL::Arrangement_2<Traits_2>                         Arrangement_2;
+using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
+using Number_type = Kernel::FT;
+using Traits_2 = CGAL::Arr_non_caching_segment_basic_traits_2<Kernel>;
+using Point_2 = Traits_2::Point_2;
+using Segment_2 = Traits_2::X_monotone_curve_2;
+using Arrangement_2 = CGAL::Arrangement_2<Traits_2>;
 
 int main(int argc, char* argv[]) {
   // Get the name of the input file from the command line, or use the default
@@ -39,14 +39,14 @@ int main(int argc, char* argv[]) {
   // <sx_n> <sy_n>  <tx_n> <ty_n>        // source and target of segment #n.
   std::list<Segment_2>  segments;
 
-  unsigned int n;
+  std::size_t n;
   in_file >> n;
   unsigned int i;
-  for (i = 0; i < n; ++i) {
+  for (std::size_t i = 0; i < n; ++i) {
     double sx, sy, tx, ty;
     in_file >> sx >> sy >> tx >> ty;
-    segments.push_back (Segment_2 (Point_2 (Number_type(sx), Number_type(sy)),
-                                   Point_2 (Number_type(tx), Number_type(ty))));
+    segments.push_back(Segment_2(Point_2 (Number_type(sx), Number_type(sy)),
+                                 Point_2 (Number_type(tx), Number_type(ty))));
   }
   in_file.close();
 
@@ -62,8 +62,8 @@ int main(int argc, char* argv[]) {
 
   // Print the arrangement dimensions.
   std::cout << "V = " << arr.number_of_vertices()
-            << ",  E = " << arr.number_of_edges()
-            << ",  F = " << arr.number_of_faces() << std::endl;
+            << ", E = " << arr.number_of_edges()
+            << ", F = " << arr.number_of_faces() << std::endl;
 
   std::cout << "Construction took " << timer.time() << " seconds.\n";
 
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp
index 2419a5868bbb..4267a229f7c0 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients.cpp
@@ -18,23 +18,22 @@ int main() {
 #include <CGAL/Arr_rational_function_traits_2.h>   // Traits
 #include <CGAL/Arrangement_2.h>                    // Arrangement
 
-typedef CORE::BigInt                               Integer;
-typedef CORE::BigRat                               Rational;
-typedef CGAL::Algebraic_kernel_d_1<Integer>           AK1;
-typedef CGAL::Arr_rational_function_traits_2<AK1>  Traits_2;
+using Integer = CORE::BigInt;
+using Rational = CORE::BigRat;
+using AK1 = CGAL::Algebraic_kernel_d_1<Integer>;
+using Traits_2 = CGAL::Arr_rational_function_traits_2<AK1>;
 
-typedef std::vector<Rational>                      Rat_vec;
-typedef Traits_2::Algebraic_real_1                 Alg_real_1;
+using Rat_vec = std::vector<Rational>;
+using Alg_real_1 = Traits_2::Algebraic_real_1;
 
-typedef CGAL::Arrangement_2<Traits_2>              Arrangement_2;
+using Arrangement_2 = CGAL::Arrangement_2<Traits_2>;
 
 int main () {
   CGAL::IO::set_pretty_mode(std::cout);             // for nice printouts.
 
   // Traits class object
   Traits_2 traits;
-  Traits_2::Construct_x_monotone_curve_2 construct_arc
-    = traits.construct_x_monotone_curve_2_object();
+  auto construct_arc = traits.construct_x_monotone_curve_2_object();
 
   // container storing all arcs
   std::vector<Traits_2::X_monotone_curve_2>  arcs;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp
index 98515d5d0c9d..1b27e3bdda0e 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sgm_point_location.cpp
@@ -14,36 +14,36 @@
 
 #include "point_location_utils.h"
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel       Kernel;
-typedef Kernel::Point_3                                         Point_3;
-typedef Kernel::Direction_3                                     Direction_3;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Point_3 = Kernel::Point_3;
+using Direction_3 = Kernel::Direction_3;
 
 #if 0
-typedef CGAL::Arr_polyhedral_sgm_traits<Kernel, -8, 6>          Gm_traits;
+using Gm_traits = CGAL::Arr_polyhedral_sgm_traits<Kernel, -8, 6>;
 #elif 0
-typedef CGAL::Arr_polyhedral_sgm_traits<Kernel, -11, 7>         Gm_traits;
+using Gm_traits = CGAL::Arr_polyhedral_sgm_traits<Kernel, -11, 7>;
 #else
-typedef CGAL::Arr_polyhedral_sgm_traits<Kernel, -1, 0>          Gm_traits;
+using Gm_traits = CGAL::Arr_polyhedral_sgm_traits<Kernel, -1, 0>;
 #endif
 
-typedef CGAL::Arr_polyhedral_sgm<Gm_traits>                     Gm;
-typedef CGAL::Arr_polyhedral_sgm_polyhedron_3<Gm, Kernel>       Gm_polyhedron;
-typedef CGAL::Arr_polyhedral_sgm_initializer<Gm, Gm_polyhedron> Gm_initializer;
+using Gm = CGAL::Arr_polyhedral_sgm<Gm_traits>;
+using Gm_polyhedron = CGAL::Arr_polyhedral_sgm_polyhedron_3<Gm, Kernel>;
+using Gm_initializer = CGAL::Arr_polyhedral_sgm_initializer<Gm, Gm_polyhedron>;
 
-typedef CGAL::Arr_naive_point_location<Gm>              Naive_pl;
-typedef CGAL::Arr_walk_along_line_point_location<Gm>    Walk_pl;
-typedef CGAL::Arr_landmarks_point_location<Gm>          Landmarks_pl;
-typedef CGAL::Arr_trapezoid_ric_point_location<Gm>      Trap_pl;
+using Naive_pl = CGAL::Arr_naive_point_location<Gm>;
+using Walk_pl = CGAL::Arr_walk_along_line_point_location<Gm>;
+using Landmarks_pl = CGAL::Arr_landmarks_point_location<Gm>;
+using Trap_pl = CGAL::Arr_trapezoid_ric_point_location<Gm>;
 
-typedef Gm::Geometry_traits_2                           Geom_traits;
-typedef Geom_traits::Point_2                            Point_2;
+using Geom_traits = Gm::Geometry_traits_2;
+using Point_2 = Geom_traits::Point_2;
 
-typedef CGAL::Arr_point_location_result<Gm>             Point_location_result;
-typedef std::pair<Point_2, Point_location_result::Type> Query_result;
+using Point_location_result = CGAL::Arr_point_location_result<Gm>;
+using Query_result = std::pair<Point_2, Point_location_result::Type>;
 
-typedef Gm::Vertex_const_handle                 Vertex_const_handle;
-typedef Gm::Halfedge_const_handle               Halfedge_const_handle;
-typedef Gm::Face_const_handle                   Face_const_handle;
+using Vertex_const_handle = Gm::Vertex_const_handle;
+using Halfedge_const_handle = Gm::Halfedge_const_handle;
+using Face_const_handle = Gm::Face_const_handle;
 
 int main() {
   Gm_polyhedron p;
@@ -77,7 +77,7 @@ int main() {
   gm_initializer(p);
   if (! gm.is_valid()) return -1;
 
-  Geom_traits::Construct_point_2 ctr_point = traits.construct_point_2_object();
+  auto ctr_point = traits.construct_point_2_object();
   Point_2 points[] = {
     ctr_point(-1, 0, 0),
     ctr_point(0, -1, 0),
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_degenerate_sweep.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_degenerate_sweep.cpp
index 8c6f46dfeb61..62d7b46654c6 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_degenerate_sweep.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_degenerate_sweep.cpp
@@ -15,31 +15,30 @@
 
 #include "arr_print.h"
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel  Kernel;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
 
 #if 0
-typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, -8, 6>  Geom_traits_2;
+using Geom_traits_2 = CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, -8, 6>;
 #elif 0
-typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, -11, 7> Geom_traits_2;
+using Geom_traits_2 = CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, -11, 7>;
 #else
-typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, -1, 0>  Geom_traits_2;
+using Geom_traits_2 = CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel, -1, 0>;
 #endif
 
-typedef Geom_traits_2::Point_2                             Point_2;
-typedef Geom_traits_2::X_monotone_curve_2                  X_monotone_curve_2;
-typedef CGAL::Arr_spherical_topology_traits_2<Geom_traits_2> Topol_traits_2;
-typedef CGAL::Arrangement_on_surface_2<Geom_traits_2, Topol_traits_2>
-                                                           Arrangement_2;
-typedef Arrangement_2::Vertex_handle                       Vertex_handle;
+using Point_2 = Geom_traits_2::Point_2;
+using X_monotone_curve_2 = Geom_traits_2::X_monotone_curve_2;
+using Topol_traits_2 = CGAL::Arr_spherical_topology_traits_2<Geom_traits_2>;
+using Arrangement_2 =
+  CGAL::Arrangement_on_surface_2<Geom_traits_2, Topol_traits_2>;
+using Vertex_handle = Arrangement_2::Vertex_handle;
 
 int main() {
   Geom_traits_2 traits;
-  Geom_traits_2::Construct_point_2 ctr_p = traits.construct_point_2_object();
-  Geom_traits_2::Construct_x_monotone_curve_2 ctr_xcv =
-    traits.construct_x_monotone_curve_2_object();
+  auto ctr_p = traits.construct_point_2_object();
+  auto ctr_xcv = traits.construct_x_monotone_curve_2_object();
 
-  std::vector< Point_2 > points;
-  std::vector< X_monotone_curve_2 > xcvs;
+  std::vector<Point_2> points;
+  std::vector<X_monotone_curve_2> xcvs;
 
   CGAL::IO::set_pretty_mode(std::cout);
 
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_insert.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_insert.cpp
index 783ef0a48f3e..e341758c75ec 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_insert.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_insert.cpp
@@ -10,12 +10,12 @@
 
 #include "arr_print.h"
 
-typedef CGAL::Exact_predicates_exact_constructions_kernel         Kernel;
-typedef CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>         Geom_traits;
-typedef Geom_traits::Point_2                                      Point;
-typedef Geom_traits::Curve_2                                      Curve;
-typedef CGAL::Arr_spherical_topology_traits_2<Geom_traits>        Topol_traits;
-typedef CGAL::Arrangement_on_surface_2<Geom_traits, Topol_traits> Arrangement;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
+using Geom_traits = CGAL::Arr_geodesic_arc_on_sphere_traits_2<Kernel>;
+using Point = Geom_traits::Point_2;
+using Curve = Geom_traits::Curve_2;
+using Topol_traits = CGAL::Arr_spherical_topology_traits_2<Geom_traits>;
+using Arrangement = CGAL::Arrangement_on_surface_2<Geom_traits, Topol_traits>;
 
 int main() {
   // Construct the arrangement from 12 geodesic arcs.
@@ -46,7 +46,6 @@ int main() {
 
   CGAL::insert(arr, arcs.begin(), arcs.end());
   print_arrangement_size(arr);          // print the arrangement size
-  // print_arrangement(arr);
 
   return 0;
 }
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_overlay.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_overlay.cpp
index 2f5f6430dee9..ba27599b22d3 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_overlay.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_overlay.cpp
@@ -7,7 +7,7 @@
 
 #include "arr_geodesic_on_sphere.h"
 
-typedef CGAL::Arr_default_overlay_traits<Arrangement>         Overlay_traits;
+using Overlay_traits = CGAL::Arr_default_overlay_traits<Arrangement>;
 
 int main() {
   Geom_traits traits;
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp
index 351e5c7e004f..100c8828e398 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting.cpp
@@ -9,9 +9,9 @@
 
 #include "arr_exact_construction_segments.h"
 
-typedef CGAL::Arr_tracing_traits_2<Traits>              Tracing_traits;
-typedef CGAL::Arr_counting_traits_2<Tracing_traits>     Geom_traits;
-typedef CGAL::Arrangement_2<Geom_traits>                My_arrangement;
+using Tracing_traits = CGAL::Arr_tracing_traits_2<Traits>;
+using Geom_traits = CGAL::Arr_counting_traits_2<Tracing_traits>;
+using My_arrangement = CGAL::Arrangement_2<Geom_traits>;
 
 int main() {
   const Segment s1(Point(0, 0), Point(2, 2));
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp
index 0b31dc9655bf..e870a714ccc1 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition.cpp
@@ -8,12 +8,12 @@
 
 #include "arr_linear.h"
 
-typedef std::variant<Vertex_const_handle, Halfedge_const_handle,
-                         Face_const_handle>              Cell_type;
-typedef std::optional<Cell_type>                       Vert_decomp_type;
-typedef std::pair<Vert_decomp_type, Vert_decomp_type>    Vert_decomp_pair;
-typedef std::pair<Vertex_const_handle, Vert_decomp_pair> Vert_decomp_entry;
-typedef std::list<Vert_decomp_entry>                     Vert_decomp_list;
+using Cell_type = std::variant<Vertex_const_handle, Halfedge_const_handle,
+                               Face_const_handle>;
+using Vert_decomp_type = std::optional<Cell_type>;
+using Vert_decomp_pair = std::pair<Vert_decomp_type, Vert_decomp_type>;
+using Vert_decomp_entry = std::pair<Vertex_const_handle, Vert_decomp_pair>;
+using Vert_decomp_list = std::list<Vert_decomp_entry>;
 
 int main() {
   // Construct the arrangement.
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp
index a0b0912a6d63..e4e415bd8254 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting.cpp
@@ -8,8 +8,8 @@
 #include "arr_inexact_construction_segments.h"
 #include "point_location_utils.h"
 
-typedef CGAL::Arr_walk_along_line_point_location<Arrangement> Walk_pl;
-typedef CGAL::Arr_trapezoid_ric_point_location<Arrangement>   Trap_pl;
+using Walk_pl = CGAL::Arr_walk_along_line_point_location<Arrangement>;
+using Trap_pl = CGAL::Arr_trapezoid_ric_point_location<Arrangement>;
 
 int main() {
   // Construct the arrangement.

From 51500440eaf5455335a6bf5f39b1e1e4902b1285 Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Wed, 1 Nov 2023 18:13:11 +0200
Subject: [PATCH 08/12] Added missing 'conct' qualifier

---
 Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h
index 6d89990e202c..a850f5ef3c88 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h
@@ -141,15 +141,15 @@ class Arr_conic_traits_2 {
 
   /*! Obtain the rational kernel.
    */
-  Shared_rat_kernel rat_kernel() { return m_rat_kernel; }
+  Shared_rat_kernel rat_kernel() const { return m_rat_kernel; }
 
   /*! Obtain the algebraic kernel.
    */
-  Shared_alg_kernel alg_kernel() { return m_alg_kernel; }
+  Shared_alg_kernel alg_kernel() const { return m_alg_kernel; }
 
   /*! Obtain the nt traits.
    */
-  Shared_nt_traits nt_traits() { return m_nt_traits; }
+  Shared_nt_traits nt_traits() const { return m_nt_traits; }
 
   /*! Obtain the next conic index. */
   static size_t get_index() {

From 04cbb6ae794a076d28dcc0b9e91b023de69c4bfd Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Wed, 1 Nov 2023 18:21:06 +0200
Subject: [PATCH 09/12] Replaced CGAL timer with std (chrono)

---
 .../Arrangement_on_surface_2/predefined_kernel.cpp |  9 ++++-----
 .../predefined_kernel_non_intersecting.cpp         | 14 +++++++-------
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp
index cca02d632103..f0ed969d845a 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel.cpp
@@ -3,9 +3,9 @@
 // predefined kernel with exact constructions and exact predicates.
 
 #include <list>
+#include <chrono>
 
 #include <CGAL/basic.h>
-#include <CGAL/Timer.h>
 
 #include "arr_exact_construction_segments.h"
 #include "arr_print.h"
@@ -28,18 +28,17 @@ int main (int argc, char* argv[]) {
 
   // Construct the arrangement by aggregately inserting all segments.
   Arrangement arr;
-  CGAL::Timer timer;
 
   std::cout << "Performing aggregated insertion of "
             << segments.size() << " segments.\n";
 
-  timer.start();
+  auto start = std::chrono::system_clock::now();
   insert(arr, segments.begin(), segments.end());
-  timer.stop();
+  std::chrono::duration<double> secs = std::chrono::system_clock::now() - start;
 
   print_arrangement_size(arr);
 
-  std::cout << "Construction took " << timer.time() << " seconds.\n";
+  std::cout << "Construction took " << secs.count() << " seconds.\n";
 
   return 0;
 }
diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
index e4474ae57678..0f91300cd605 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
@@ -2,12 +2,13 @@
 // Constructing an arrangement of non-intersecting line segments using the
 // predefined kernel with exact predicates.
 
+#include <list>
+#include <fstream>
+#include <chrono>
+
 #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
 #include <CGAL/Arr_non_caching_segment_basic_traits_2.h>
 #include <CGAL/Arrangement_2.h>
-#include <CGAL/Timer.h>
-#include <list>
-#include <fstream>
 
 using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
 using Number_type = Kernel::FT;
@@ -52,20 +53,19 @@ int main(int argc, char* argv[]) {
 
   // Construct the arrangement by aggregately inserting all segments.
   Arrangement_2 arr;
-  CGAL::Timer timer;
 
   std::cout << "Performing aggregated insertion of " << n << " segments.\n";
 
-  timer.start();
+  auto start = std::chrono::system_clock::now();
   insert_non_intersecting_curves (arr, segments.begin(), segments.end());
-  timer.stop();
+  std::chrono::duration<double> secs = std::chrono::system_clock::now() - start;
 
   // Print the arrangement dimensions.
   std::cout << "V = " << arr.number_of_vertices()
             << ", E = " << arr.number_of_edges()
             << ", F = " << arr.number_of_faces() << std::endl;
 
-  std::cout << "Construction took " << timer.time() << " seconds.\n";
+  std::cout << "Construction took " << secs.count() << " seconds.\n";
 
   return 0;
 }

From 7458d6adf316bf9b870ba4f053ad5a8b89b2c590 Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Wed, 1 Nov 2023 19:12:25 +0200
Subject: [PATCH 10/12] used epec (and not epic)

---
 .../examples/Arrangement_on_surface_2/draw_arr.cpp            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/draw_arr.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/draw_arr.cpp
index ea99cca39a85..df84f9727337 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/draw_arr.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/draw_arr.cpp
@@ -1,9 +1,9 @@
-#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
 #include <CGAL/Arrangement_2.h>
 #include <CGAL/Arr_segment_traits_2.h>
 #include <CGAL/draw_arrangement_2.h>
 
-using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
+using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
 using Traits = CGAL::Arr_segment_traits_2<Kernel>;
 using Point = Traits::Point_2;
 using Arrangement_2 = CGAL::Arrangement_2<Traits>;

From a850c344609a4c487d3972ba12e0a8a54849995a Mon Sep 17 00:00:00 2001
From: Efi Fogel <efifogel@gmail.com>
Date: Thu, 9 Nov 2023 15:06:23 +0200
Subject: [PATCH 11/12] Fixed Are_mergable_2 functor; add code that tests
 whether the equal operator (operator==) is applicable to the data that
 extends the curve

---
 .../include/CGAL/Arr_curve_data_traits_2.h    | 36 ++++++++++---------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
index d0a68b2885ba..810da81aa6f6 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
@@ -247,27 +247,32 @@ class Arr_curve_data_traits_2 : public Traits_ {
   private:
     const Base_traits_2& m_base;
 
-    /*! Generate a helper class template to find out whether the base geometry
-     * traits has a nested type named Are_mergeable_2.
-     */
-    BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_are_mergeable_2,
-                                      Are_mergeable_2, false)
+    template <typename T>
+    bool are_mergeable_data(const T& cv1, const T& cv2, long) const {
+      CGAL_error_msg("Equality operator is not supported.");
+      return false;
+    }
+
+    template <typename T>
+    auto are_mergeable_data(const T& cv1, const T& cv2, int) const ->
+      decltype(cv1.data() == cv2.data())
+    { return cv1.data() == cv2.data(); }
 
     /*! Implementation of the predicate in case the base geometry traits class
      * has a nested type named Are_mergeable_2.
      */
     template <typename GeomeTraits_2>
-    std::enable_if_t<has_are_mergeable_2<GeomeTraits_2>::value,bool>
-    are_mergeable(const X_monotone_curve_2& cv1,
-                  const X_monotone_curve_2& cv2) const
-    {
+    auto are_mergeable(const X_monotone_curve_2& cv1,
+                       const X_monotone_curve_2& cv2,
+                       const GeomeTraits_2& traits, int) const ->
+    decltype(traits.are_mergeable_2_object(), bool()) {
       // In case the two base curves are not mergeable, the extended curves
       // are not mergeable as well.
-      if (! (m_base.are_mergeable_2_object()(cv1, cv2))) return false;
+      if (! (traits.are_mergeable_2_object()(cv1, cv2))) return false;
 
       // In case the two base curves are mergeable, check that they have the
       // same data fields.
-      return (cv1.data() == cv2.data());
+      return are_mergeable_data(cv1, cv2, 0);
     }
 
     /*! Implementation of the predicate in case the base geometry traits class
@@ -275,10 +280,9 @@ class Arr_curve_data_traits_2 : public Traits_ {
      * This function should never be called!
      */
     template <typename GeomeTraits_2>
-    std::enable_if_t<!has_are_mergeable_2<GeomeTraits_2>::value,bool>
-    are_mergeable(const X_monotone_curve_2& /* cv1 */,
-                  const X_monotone_curve_2& /* cv2 */) const
-    {
+    bool are_mergeable(const X_monotone_curve_2& /* cv1 */,
+                       const X_monotone_curve_2& /* cv2 */,
+                       const GeomeTraits_2& /* traits */, long) const {
       CGAL_error_msg("Are mergeable is not supported.");
       return false;
     }
@@ -294,7 +298,7 @@ class Arr_curve_data_traits_2 : public Traits_ {
      */
     bool operator()(const X_monotone_curve_2& cv1,
                     const X_monotone_curve_2& cv2) const
-    { return are_mergeable<Base_traits_2>(cv1, cv2); }
+    { return are_mergeable<Base_traits_2>(cv1, cv2, m_base, 0); }
   };
 
   /*! Obtain an Are_mergeable_2 functor object. */

From 30bdbab52427a4761534f0bf98f989d9d6f6acea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= <sebastien.loriot@cgal.org>
Date: Mon, 27 Nov 2023 13:20:38 +0100
Subject: [PATCH 12/12] fix warnings

---
 .../predefined_kernel_non_intersecting.cpp                      | 1 -
 Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
index 0f91300cd605..2300d13c7814 100644
--- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
+++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
@@ -42,7 +42,6 @@ int main(int argc, char* argv[]) {
 
   std::size_t n;
   in_file >> n;
-  unsigned int i;
   for (std::size_t i = 0; i < n; ++i) {
     double sx, sy, tx, ty;
     in_file >> sx >> sy >> tx >> ty;
diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
index 810da81aa6f6..b4ecc559815d 100644
--- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
+++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h
@@ -248,7 +248,7 @@ class Arr_curve_data_traits_2 : public Traits_ {
     const Base_traits_2& m_base;
 
     template <typename T>
-    bool are_mergeable_data(const T& cv1, const T& cv2, long) const {
+    bool are_mergeable_data(const T& /* cv1 */, const T& /* cv2 */, long) const {
       CGAL_error_msg("Equality operator is not supported.");
       return false;
     }