Subject: CGAL users discussion list
List archive
- From: Sylvain Pion <>
- To:
- Subject: Re: [cgal-discuss] compiler warning under vs7.1 for 3.3.1 (minor)
- Date: Tue, 11 Sep 2007 23:26:28 +0200
Peter Schröder a écrit :
The following (from float.h) elicits a warning that the return type is being cast from double implicitly:
class Kth_root
: public Binary_function<int, Type, Type> {
public:
Type operator()( int k,
const Type& x) const {
CGAL_precondition_msg( k > 0, "'k' must be positive for k-th roots");
return CGAL_CLIB_STD::pow(double(x), 1.0 / double(k));
};
};
Might be nice to make an explicit cast to (Type) to avoid this warning from the compiler. Yes, it's only a warning, but I tend to think that one wants no warnings (which are reasonable) as getting used to ignoring warnings is generally a bad thing...
Thanks Peter for reporting this.
I definitely concur on your opinion concerning warnings.
--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
- compiler warning under vs7.1 for 3.3.1 (minor), Peter Schröder, 09/11/2007
- Triangulation of several polyhedra, Jens K. Becker, 09/11/2007
- Re: [cgal-discuss] compiler warning under vs7.1 for 3.3.1 (minor), Sylvain Pion, 09/11/2007
Archive powered by MHonArc 2.6.16.