mirror of https://github.com/CGAL/cgal
Gmpz constructor from double now emits a warning for non-integral values.
This commit is contained in:
parent
a50b5877ba
commit
fbff6b2945
|
|
@ -96,7 +96,10 @@ public:
|
|||
{ mpz_init_set_ui(mpz(), l); }
|
||||
|
||||
Gmpz(double d)
|
||||
{ mpz_init_set_d(mpz(), d); }
|
||||
{
|
||||
CGAL_warning_msg(is_integral(d), "Gmpz constructed from non-integral double value");
|
||||
mpz_init_set_d(mpz(), d);
|
||||
}
|
||||
|
||||
Gmpz(const std::string& str, int base = 10)
|
||||
{ mpz_init_set_str(mpz(), str.c_str(), base); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue