From 2d52c00438cde2c47f43620d26d78022f0d60746 Mon Sep 17 00:00:00 2001 From: Alexei Sheplyakov Date: Wed, 19 Mar 2008 12:28:10 +0300 Subject: [PATCH] Implicit conversion from cl_N to numeric considered harmful. Finally, mark the numeric(const cl_N&) ctor as explicit. This allows one to mix the code using GiNaC and CLN, i.e. cl_N x, y; // initialize them cl_N z = sin(x) + y*exp(y); symbol a("a"); ex e = exp(a); --- ginac/numeric.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ginac/numeric.h b/ginac/numeric.h index c0f9a8b6..bf5c7013 100644 --- a/ginac/numeric.h +++ b/ginac/numeric.h @@ -184,7 +184,7 @@ public: const numeric denom() const; int int_length() const; // converting routines for interfacing with CLN: - numeric(const cln::cl_N &z); + explicit numeric(const cln::cl_N &z); protected: void print_numeric(const print_context & c, const char *par_open, const char *par_close, const char *imag_sym, const char *mul_sym, unsigned level) const; -- 2.46.0