From: Ian Scott <ian.scott@st...> - 2003-10-28 11:55:21
The recent deprecation of vnl_numeric_limits has exposed a problem on the
libstdc++ that comes with gcc versions 3.0 - 3.2.x.
vcl_numeric_limits<double>::has_infinity() returns false on many of our
platforms. (This despite there certainly being an infinity on these x86
platforms.) The problem looks fixed in gcc 3.3
There is code in VXL that assumes that
vcl_numeric_limits<double>::has_infinity() == true. In particular
vcl_test_limits and vnl_test_math make that assumption, which is why they
So the questions.
1. Should I undo my deprecation of vnl_numeric_limits (for which
has_infinity == true)?
- I don't think this is a good idea, and the consensus on the dashboard
was to deprecate vnl_numeric_limits.
2. Should there be a CMake option to explicitly override the compiler
provided vcl_limits.h and use vcl/emulation/vcl_limits.h (which is copied
- I like this idea
3. Should any code which assumes that has_inifinity is true, be fixed so
that it doesn't make the assumption, or fails at compile time if it really
- I think this combined with (2) is ideal. I'm certainly going to fix
vcl_test_limits this way,