[vtk-developers] vtkMath inline choices...
Sean McBride
sean at rogue-research.com
Mon Jan 31 15:58:04 EST 2011
On Mon, 31 Jan 2011 11:17:35 -0700, Moreland, Kenneth said:
>Since we are talking about inlining vtkMath::IsNaN anyway, why not just
>provide overloaded inlined functions for integer types that always
>return false? That way the compiler removes the check for you without
>having to write any type-dependent case code.
To me that would be a bit weird. I see vtkMath::IsNaN() as a hack to
support the standard isnan() in places where it is not supported. In
the long term (when we require C++0x conforming compilers), I would
remove vtkMath::IsNaN() in favour of isnan(). isnan()'s meaning is
standardised by C99 and C++0x, and changing that meaning in VTK would be
odd IMO.
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list