Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73601 - in trunk: boost status
From: antoshkka_at_[hidden]
Date: 2011-08-07 13:38:34


Author: apolukhin
Date: 2011-08-07 13:38:33 EDT (Sun, 07 Aug 2011)
New Revision: 73601
URL: http://svn.boost.org/trac/boost/changeset/73601

Log:
Fixes #5732.

* some fixes for WinCE
* updated explicit failures markup
Text files modified:
   trunk/boost/lexical_cast.hpp | 15 ++++++++++-----
   trunk/status/explicit-failures-markup.xml | 10 ++++++++++
   2 files changed, 20 insertions(+), 5 deletions(-)

Modified: trunk/boost/lexical_cast.hpp
==============================================================================
--- trunk/boost/lexical_cast.hpp (original)
+++ trunk/boost/lexical_cast.hpp 2011-08-07 13:38:33 EDT (Sun, 07 Aug 2011)
@@ -1156,7 +1156,7 @@
             { using namespace std;
                 if (put_inf_nan(start,finish,val)) return true;
                 finish = start + swprintf(out,
-#if !defined(__MINGW32__)
+#if !defined(__MINGW32__) && !defined(UNDER_CE)
                                           finish-start,
 #endif
                                           L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float >()), val );
@@ -1172,11 +1172,12 @@
                  * For mingw-w64, __MINGW64__ is defined, too, when targetting
                  * 64 bits.
                  *
- * swprintf realization in MinGW does not conform to the ISO C
+ * swprintf realization in MinGW and under WinCE does not conform
+ * to the ISO C
                  * Standard.
                  */
                 finish = start + swprintf(out,
-#if !defined(__MINGW32__)
+#if !defined(__MINGW32__) && !defined(UNDER_CE)
                                           finish-start,
 #endif
                                           L"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
@@ -1187,10 +1188,14 @@
             bool shl_long_double(long double val,wchar_t* out)
             { using namespace std;
                 if (put_inf_nan(start,finish,val)) return true;
- finish = start + swprintf(out, finish-start, L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
+ finish = start + swprintf(out,
+#if !defined(UNDER_CE)
+ finish-start,
+#endif
+ L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
                 return finish > start;
             }
- #endif
+#endif
 
 #endif
 

Modified: trunk/status/explicit-failures-markup.xml
==============================================================================
--- trunk/status/explicit-failures-markup.xml (original)
+++ trunk/status/explicit-failures-markup.xml 2011-08-07 13:38:33 EDT (Sun, 07 Aug 2011)
@@ -632,6 +632,7 @@
                 <toolset name="gcc-4.1*"/>
                 <toolset name="gcc-4.2.0*"/>
                 <toolset name="gcc-mingw-3.4*"/>
+ <toolset name="gcc-mingw-4.*"/>
                 <toolset name="sun-5.7*"/>
                 <toolset name="sun-5.8*"/>
                 <toolset name="sun-5.9*"/>
@@ -647,6 +648,15 @@
                 </note>
             </mark-failure>
         </test>
+ <test name="lexical_cast_float_types_test">
+ <mark-failure>
+ <toolset name="gcc-mingw-4.*"/>
+ <toolset name="vacpp-10.1"/>
+ <note author="Antony Polukhin">
+ Some compilers and STL realizations convert double and long double types with bigger precision loss than minimal. Such failures are not a lexical_cast, but a compiler fault.
+ </note>
+ </mark-failure>
+ </test>
     </library>
 
     <!-- crc -->


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