Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78450 - in branches/release: boost libs/conversion/test status
From: antoshkka_at_[hidden]
Date: 2012-05-13 04:15:54


Author: apolukhin
Date: 2012-05-13 04:15:51 EDT (Sun, 13 May 2012)
New Revision: 78450
URL: http://svn.boost.org/trac/boost/changeset/78450

Log:
Merge from trunk:
* Fixes ISO C++ does not support the ‘%lg’ gnu_printf format (refs #6852)
* explicit-failures-markup merge from trunk
* supress warnings in implicit_cast.cpp test
Text files modified:
   branches/release/boost/lexical_cast.hpp | 12 ++++++++----
   branches/release/libs/conversion/test/implicit_cast.cpp | 6 ++++++
   branches/release/status/explicit-failures-markup.xml | 9 +++++++++
   3 files changed, 23 insertions(+), 4 deletions(-)

Modified: branches/release/boost/lexical_cast.hpp
==============================================================================
--- branches/release/boost/lexical_cast.hpp (original)
+++ branches/release/boost/lexical_cast.hpp 2012-05-13 04:15:51 EDT (Sun, 13 May 2012)
@@ -1322,7 +1322,8 @@
             { using namespace std;
                 if (put_inf_nan(begin, end, val)) return true;
                 end = begin;
- end += sprintf(begin,"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float>()), val);
+ const double val_as_double = val;
+ end += sprintf(begin,"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float>()), val_as_double);
                 return end > begin;
             }
 
@@ -1330,7 +1331,7 @@
             { using namespace std;
                 if (put_inf_nan(begin, end, val)) return true;
                 end = begin;
- end += sprintf(begin,"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double>()), val);
+ end += sprintf(begin,"%.*g", static_cast<int>(boost::detail::lcast_get_precision<double>()), val);
                 return end > begin;
             }
 
@@ -1353,8 +1354,11 @@
             static bool shl_real_type(float val, wchar_t* begin, wchar_t*& end)
             { using namespace std;
                 if (put_inf_nan(begin, end, val)) return true;
+ const double val_as_double = val;
                 end = begin + swprintf(begin, end-begin,
- L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float >()), val );
+ L"%.*g",
+ static_cast<int>(boost::detail::lcast_get_precision<float >()),
+ val_as_double );
                 return end > begin;
             }
 
@@ -1362,7 +1366,7 @@
             { using namespace std;
                 if (put_inf_nan(begin, end, val)) return true;
                 end = begin + swprintf(begin, end-begin,
- L"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
+ L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
                 return end > begin;
             }
 

Modified: branches/release/libs/conversion/test/implicit_cast.cpp
==============================================================================
--- branches/release/libs/conversion/test/implicit_cast.cpp (original)
+++ branches/release/libs/conversion/test/implicit_cast.cpp 2012-05-13 04:15:51 EDT (Sun, 13 May 2012)
@@ -28,5 +28,11 @@
 
     type<foo> f = check_return(boost::implicit_cast<foo>("hello"));
     type<long> z = check_return(boost::implicit_cast<long>(foo("hello")));
+
+ // warning supression:
+ (void)x;
+ (void)f;
+ (void)z;
+
     return boost::report_errors();
 }

Modified: branches/release/status/explicit-failures-markup.xml
==============================================================================
--- branches/release/status/explicit-failures-markup.xml (original)
+++ branches/release/status/explicit-failures-markup.xml 2012-05-13 04:15:51 EDT (Sun, 13 May 2012)
@@ -642,6 +642,15 @@
                 </note>
             </mark-failure>
         </test>
+ <test name="lexical_cast_containers_test">
+ <mark-failure>
+ <toolset name="vacpp*"/>
+ <toolset name="msvc-9.0~wm5~*"/>
+ <note author="Antony Polukhin">
+ This compiler is unable to compile Boost.Container library
+ </note>
+ </mark-failure>
+ </test>
         <test name="lexical_cast_loopback_test">
             <mark-failure>
                 <toolset name="borland-5.6*"/>


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