$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r71439 - trunk/libs/math/example
From: pbristow_at_[hidden]
Date: 2011-04-23 09:52:55
Author: pbristow
Date: 2011-04-23 09:52:54 EDT (Sat, 23 Apr 2011)
New Revision: 71439
URL: http://svn.boost.org/trac/boost/changeset/71439
Log:
Added check that infinity supported.  and ends with newline.
Text files modified: 
   trunk/libs/math/example/lexical_cast_native.cpp |    14 +++++++++++++-                          
   1 files changed, 13 insertions(+), 1 deletions(-)
Modified: trunk/libs/math/example/lexical_cast_native.cpp
==============================================================================
--- trunk/libs/math/example/lexical_cast_native.cpp	(original)
+++ trunk/libs/math/example/lexical_cast_native.cpp	2011-04-23 09:52:54 EDT (Sat, 23 Apr 2011)
@@ -60,6 +60,18 @@
 int main ()
 {
   std::cout << "lexical_cast example (NOT using finite_num_facet)." << std::endl;
+    
+  if((std::numeric_limits<double>::has_infinity == false) || (std::numeric_limits<double>::infinity() == 0))
+  {
+    std::cout << "Infinity not supported on this platform." << std::endl;
+    return 0;
+  }
+
+  if((std::numeric_limits<double>::has_quiet_NaN == false) || (std::numeric_limits<double>::quiet_NaN() == 0))
+  {
+    std::cout << "NaN not supported on this platform." << std::endl;
+    return 0;
+  }
   
   // Some tests that are expected to fail on some platforms.
   // (But these tests are expected to pass using non_finite num_put and num_get facets).
@@ -118,4 +130,4 @@
 C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: :VCEnd" exited with code 3.
 
 
-*/
\ No newline at end of file
+*/