call of overloaded ‘sqrt(double)’ is ambiguous
During compilation of the code including VTK v.8.0.1 and OpenFOAM v.5.0, c++ compiler reports errors "call of overloaded ‘sqrt(double)’ is ambiguous" in:
- vtkMath.h:432:58: In static member function ‘static double vtkMath::Norm(const double*)’: static double Norm(const double v[3]) {return sqrt( v[0] * v[0] + v[1] * v[1] + v[2] * v[2] );};
- vtkMath.h:572:44: In static member function ‘static double vtkMath::Norm2D(const double*)’: static double Norm2D(const double x[2]) {return sqrt( x[0] * x[0] + x[1] * x[1] );};
- vtkVector.h:80:57: In member function ‘double vtkVector<T, Size>::Norm() const’: double Norm() const {return sqrt(static_cast(this->SquaredNorm()));}
- vtkTriangle.h:271:58: In static member function ‘static void vtkTriangle::ComputeNormal(double*, double*, double*, double*)’:
I suppose, that solution could be to define explicitly namespace for sqrt() and other mathematics functions in VTK.
Best regards,
Algis
Edited by Algis Džiugys