From 3d4f2a3dd8b63c4cfcb59a714b4883594499747f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 25 Oct 2024 08:57:31 +0200 Subject: [PATCH] add copy/init from the same type but with the opposite caching strategy --- .../include/CGAL/Sqrt_extension/Sqrt_extension_type.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h index 6b87205b501..98318babf48 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -135,6 +135,17 @@ public: Sqrt_extension(const NT& i) : a0_(NT(i)), a1_(NT(0)), root_(ROOT(0)), is_extended_(false) {} + Sqrt_extension(const Sqrt_extension>& other) + : a0_(other.a0()), a1_(other.a1()), root_(other.root()), is_extended_(other.is_extended()) + {} + + Sqrt_extension& + operator=(const Sqrt_extension>& other) + { + *this = Sqrt_extension(other); + return *this; + } + //non-documented: used for Make_sqrt Sqrt_extension(const ROOT& root,bool) :a0_(NT(0)), a1_(NT(1)), root_(root), is_extended_(true) {}