From ee0ec71857a4a10bfee04c05829c9ea3bf30e26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 2 Jun 2022 15:55:57 +0200 Subject: [PATCH] add a template version of the constructor --- CGAL_Core/include/CGAL/CORE/BigInt.h | 42 ++-------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/BigInt.h b/CGAL_Core/include/CGAL/CORE/BigInt.h index c20ed181b72..d88cee25895 100644 --- a/CGAL_Core/include/CGAL/CORE/BigInt.h +++ b/CGAL_Core/include/CGAL/CORE/BigInt.h @@ -46,51 +46,15 @@ public: : mp() {} - // Note : should the copy-ctor be allowed at all ? [Sylvain Pion] - BigIntRep(const BigIntRep& z) : RCRepImpl(), mp(z.mp) + BigIntRep(const BigIntRep& z) : RCRepImpl(), mp(z.mp) {} - BigIntRep(signed char c) + template + BigIntRep(T c) : mp(c) {} - BigIntRep(unsigned char c) - : mp(c) - {} - - BigIntRep(signed int i) - : mp(i) - {} - - BigIntRep(unsigned int i) - : mp(i) - {} - - - BigIntRep(signed short int s) - : mp(s) - {} - BigIntRep(unsigned short int s) - : mp(s) - {} - - BigIntRep(signed long int l) - : mp(l) - {} - - BigIntRep(unsigned long int l) - : mp(l) - {} - - BigIntRep(float f) - : mp(f) - {} - - BigIntRep(double d) - : mp(d) - {} - BigIntRep(const char* s, int base=0) : mp(s) {}