Skip to Content.
Sympa Menu

cgal-discuss - compiler warning under vs7.1 for 3.3.1 (minor)

Subject: CGAL users discussion list

List archive

compiler warning under vs7.1 for 3.3.1 (minor)


Chronological Thread 
  • From: Peter Schröder <>
  • To: CGAL <>
  • Subject: compiler warning under vs7.1 for 3.3.1 (minor)
  • Date: Tue, 11 Sep 2007 05:32:50 -0700
  • Organization: Caltech Multi-Res Modeling Group

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...

Peter

Peter



Archive powered by MHonArc 2.6.16.

Top of Page