Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71443 - trunk/libs/math/example
From: pbristow_at_[hidden]
Date: 2011-04-23 10:27:51


Author: pbristow
Date: 2011-04-23 10:27:50 EDT (Sat, 23 Apr 2011)
New Revision: 71443
URL: http://svn.boost.org/trac/boost/changeset/71443

Log:
Added
#if (!defined __BORLANDC__ && !defined __CODEGEARC__) to avoid a signaling_NaN trap on these compilers.
 
Text files modified:
   trunk/libs/math/example/nonfinite_signaling_NaN.cpp | 3 +++
   1 files changed, 3 insertions(+), 0 deletions(-)

Modified: trunk/libs/math/example/nonfinite_signaling_NaN.cpp
==============================================================================
--- trunk/libs/math/example/nonfinite_signaling_NaN.cpp (original)
+++ trunk/libs/math/example/nonfinite_signaling_NaN.cpp 2011-04-23 10:27:50 EDT (Sat, 23 Apr 2011)
@@ -84,6 +84,8 @@
     cout << "quiet_NaN input was " << r << endl; // "1"
   }
 
+#if (!defined __BORLANDC__ && !defined __CODEGEARC__)
+ // These compilers trap when trying to create a signaling_NaN!
   { // Try Signaling NaN
     stringstream ss; // Both input and output.
     ss.imbue(default_locale); // Redundant, of course.
@@ -105,6 +107,7 @@
     cout << "signaling_NaN output was " << infs << endl; // "1.#QNAN" (or "1.#SNAN"?)
     cout << "signaling_NaN input was " << r << endl; // "1"
   }
+#endif // Not Borland or CodeGear.
 
   // Create legacy_locale and store the nonfinite_num_get facet (with legacy flag) in it.
   locale legacy_locale(default_locale, new nonfinite_num_get<char>(boost::math::legacy));


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk