|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73171 - trunk/libs/math/example
From: pbristow_at_[hidden]
Date: 2011-07-17 07:30:34
Author: pbristow
Date: 2011-07-17 07:30:32 EDT (Sun, 17 Jul 2011)
New Revision: 73171
URL: http://svn.boost.org/trac/boost/changeset/73171
Log:
Minor change to avoid a warning.
Text files modified:
trunk/libs/math/example/lexical_cast_nonfinite_facets.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Modified: trunk/libs/math/example/lexical_cast_nonfinite_facets.cpp
==============================================================================
--- trunk/libs/math/example/lexical_cast_nonfinite_facets.cpp (original)
+++ trunk/libs/math/example/lexical_cast_nonfinite_facets.cpp 2011-07-17 07:30:32 EDT (Sun, 17 Jul 2011)
@@ -100,10 +100,11 @@
cout << "-std::numeric_limits<double>::infinity() = " << minus_infinity << endl;
cout << "+std::numeric_limits<double>::quiet_NaN () = " << NaN << endl;
- // Now try some 'round-tripping', 'reading' "inf"
+ // Now try some 'round-tripping', 'reading' "inf".
double x = boost::lexical_cast<double>("inf");
// and check we get a floating-point infinity.
BOOST_ASSERT(x == std::numeric_limits<double>::infinity());
+ cout << "boost::lexical_cast<double>(\"inf\") = " << x << endl;
// Check we can convert the other way from floating-point infinity,
string s = boost::lexical_cast<string>(numeric_limits<double>::infinity());
@@ -121,11 +122,12 @@
/*
Output:
-
finite_num_facet with lexical_cast example.
- Using C99_out_locale
+ Using C99_out_locale
+std::numeric_limits<double>::infinity() = inf
-std::numeric_limits<double>::infinity() = -inf
+std::numeric_limits<double>::quiet_NaN () = nan
+ boost::lexical_cast<double>("inf") = inf
+
*/
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