]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/date_time/date_formatting_locales.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / date_time / date_formatting_locales.hpp
index 2c17c055cda2749540f191fee10bf8872cad8b19..a1daad33ae7a2d4438b96490854874e94e844233 100644 (file)
@@ -17,6 +17,7 @@
 #include "boost/date_time/iso_format.hpp"
 #include "boost/date_time/date_names_put.hpp"
 #include "boost/date_time/parse_format_base.hpp"
+#include <boost/io/ios_state.hpp>
 //#include <string>
 #include <sstream>
 #include <iomanip>
@@ -56,8 +57,8 @@ namespace date_time {
         }
         case month_as_integer:
         {
-          charT fill_char = '0';
-          os << std::setw(2) << std::setfill(fill_char) << month.as_number();
+          boost::io::basic_ios_fill_saver<charT> ifs(os);
+          os << std::setw(2) << std::setfill(os.widen('0')) << month.as_number();
           break;
         }
 
@@ -132,8 +133,8 @@ namespace date_time {
                         ostream_type& os,
                         const facet_type& f)
     {
+      boost::io::basic_ios_fill_saver<charT> ifs(os);
       std::ostreambuf_iterator<charT> oitr(os);
-      charT fill_char = '0';
       switch (f.date_order()) {
         case ymd_order_iso: {
           os << ymd.year;
@@ -144,7 +145,7 @@ namespace date_time {
           if (f.has_date_sep_chars()) {
             f.day_sep_char(oitr);
           }
-          os  << std::setw(2) << std::setfill(fill_char)
+          os  << std::setw(2) << std::setfill(os.widen('0'))
               << ymd.day;
           break;
         }
@@ -153,7 +154,7 @@ namespace date_time {
           if (f.has_date_sep_chars()) {
           f.day_sep_char(oitr);
           }
-          os  << std::setw(2) << std::setfill(fill_char)
+          os  << std::setw(2) << std::setfill(os.widen('0'))
             << ymd.day;
           if (f.has_date_sep_chars()) {
             f.month_sep_char(oitr);
@@ -162,7 +163,7 @@ namespace date_time {
           break;
         }
         case ymd_order_dmy: {
-          os  << std::setw(2) << std::setfill(fill_char)
+          os  << std::setw(2) << std::setfill(os.widen('0'))
               << ymd.day;
           if (f.has_date_sep_chars()) {
             f.day_sep_char(oitr);