[numeric cast] Borland 2006 patch

Workarounds for old compiler are still necessary, simple update of version check should suffice: cvs diff -u -wb -- boost\numeric\conversion\cast.hpp (in directory E:\sourceforge\devel\boost\) Index: boost/numeric/conversion/cast.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/numeric/conversion/cast.hpp,v retrieving revision 1.8 diff -u -w -b -r1.8 cast.hpp --- boost/numeric/conversion/cast.hpp 27 Jun 2005 15:05:12 -0000 1.8 +++ boost/numeric/conversion/cast.hpp 19 Feb 2006 12:19:22 -0000 @@ -22,7 +22,7 @@ #include <boost/detail/workaround.hpp> -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, == 0x564) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) # include<boost/numeric/conversion/detail/old_numeric_cast.hpp> OK to commit? -- AlisdairM

Hi Alisdair, Sorry for the delay... AlisdairM wrote:
Workarounds for old compiler are still necessary, simple update of version check should suffice:
cvs diff -u -wb -- boost\numeric\conversion\cast.hpp (in directory E:\sourceforge\devel\boost\) Index: boost/numeric/conversion/cast.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/numeric/conversion/cast.hpp,v retrieving revision 1.8 diff -u -w -b -r1.8 cast.hpp --- boost/numeric/conversion/cast.hpp 27 Jun 2005 15:05:12 -0000 1.8 +++ boost/numeric/conversion/cast.hpp 19 Feb 2006 12:19:22 -0000 @@ -22,7 +22,7 @@
#include <boost/detail/workaround.hpp>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(_BORLANDC_, == 0x564) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(_BORLANDC_, BOOST_TESTED_AT(0x581))
# include<boost/numeric/conversion/detail/old_numeric_cast.hpp>
OK to commit?
I suppose so... This particular problem was not all-borland specific but particular of bcc 5.6.4. That is, the library works in 5.5.1 (If I recall the version number correctly... it's been so long :) In fact, the library was developed in that compiler, so the idea was that only the user of the latest bcc (at the time) needed to switch back to the old numeric cast. More specifically, numeric_limits<> failed to provide compile time constants in the new STL (it was ok when they used RW) So, if that was just kept broken forever after 5.6.4; or the new numeric cast fails for any other reason, go ahead and commit the fix. Best -- Fernando Cacciola SciSoft http://fcacciola.50webs.com/

Fernando Cacciola wrote:
I suppose so... This particular problem was not all-borland specific but particular of bcc 5.6.4.
Specifically 5.6.4, or any compiler on the 5.6 cycle?
More specifically, numeric_limits<> failed to provide compile time constants in the new STL (it was ok when they used RW)
So it might work correctly on bcc 5.6.4 using the old Rogue Wave library (that still shipped with the product)?
So, if that was just kept broken forever after 5.6.4; or the new numeric cast fails for any other reason, go ahead and commit the fix.
Looks like it is broken with the new compiler/Dinkumware libraries as well, but I did not look very hard after getting the above patch to work. Has the library implementation evolved at all since the original 5.5.1 code? IIUC, the plan is to end-of-life support for Borland compilers (along with old MS, GCC and Metrowerks - for some definition of 'old') prior to the lastest after the 1.34 release cycle, so simply moving to BOOST_TESTED_AT is probably the best answer at this point. Unless someone can bang in a working patch for the new implementation ;?) -- AlisdairM
participants (2)
-
AlisdairM
-
Fernando Cacciola