]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/date_time/gregorian/greg_facet.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / date_time / gregorian / greg_facet.hpp
index f720aac3bf978fc712eb1f453c3e06328a52f276..5352df1398a1b384f2d78d0068c4d78b47af2260 100644 (file)
@@ -13,6 +13,7 @@
 #include <boost/date_time/gregorian/gregorian_types.hpp>
 #include <boost/date_time/date_formatting_locales.hpp> // sets BOOST_DATE_TIME_NO_LOCALE
 #include <boost/date_time/gregorian/parsers.hpp>
+#include <boost/io/ios_state.hpp>
 
 //This file is basically commented out if locales are not supported
 #ifndef BOOST_DATE_TIME_NO_LOCALE
@@ -75,9 +76,9 @@ namespace gregorian {
       greg_month_formatter::format_month(m, os, f);
 
     }
-    else { //default to numeric
-      charT fill_char = '0';
-      os  << std::setw(2) << std::setfill(fill_char) << m.as_number();
+    else { // default to numeric
+      boost::io::basic_ios_fill_saver<charT> ifs(os);
+      os  << std::setw(2) << std::setfill(os.widen('0')) << m.as_number();
     }
 
     return os;
@@ -142,7 +143,8 @@ namespace gregorian {
   std::basic_ostream<charT, traits>&
   operator<<(std::basic_ostream<charT, traits>& os, const partial_date& pd)
   {
-    os << std::setw(2) << std::setfill('0') << pd.day() << ' ' 
+    boost::io::basic_ios_fill_saver<charT> ifs(os);
+    os << std::setw(2) << std::setfill(os.widen('0')) << pd.day() << ' ' 
        << pd.month().as_short_string() ; 
     return os;
   }