diff options
Diffstat (limited to 'boost/chrono/io')
-rw-r--r-- | boost/chrono/io/ios_base_state.hpp | 7 | ||||
-rw-r--r-- | boost/chrono/io/time_point_get.hpp | 4 | ||||
-rw-r--r-- | boost/chrono/io/time_point_io.hpp | 10 | ||||
-rw-r--r-- | boost/chrono/io/utility/ios_base_state_ptr.hpp | 7 |
4 files changed, 15 insertions, 13 deletions
diff --git a/boost/chrono/io/ios_base_state.hpp b/boost/chrono/io/ios_base_state.hpp index 6e320a5678..1393e2e699 100644 --- a/boost/chrono/io/ios_base_state.hpp +++ b/boost/chrono/io/ios_base_state.hpp @@ -113,9 +113,10 @@ namespace boost std::basic_string<CharT> duration_fmt; public: - ios_base_data_aux() : - time_fmt(""), - duration_fmt("") + ios_base_data_aux() + //: + // time_fmt(""), + // duration_fmt("") { } }; diff --git a/boost/chrono/io/time_point_get.hpp b/boost/chrono/io/time_point_get.hpp index 5e4acd39cc..44c641e6da 100644 --- a/boost/chrono/io/time_point_get.hpp +++ b/boost/chrono/io/time_point_get.hpp @@ -279,12 +279,12 @@ namespace boost if (std::has_facet<time_point_units<CharT> >(is.getloc())) { time_point_units<CharT> const &facet = std::use_facet<time_point_units<CharT> >(is.getloc()); - return get_epoch(facet, i, e, is, err); + return get_epoch<Clock>(facet, i, e, is, err); } else { time_point_units_default<CharT> facet; - return get_epoch(facet, i, e, is, err); + return get_epoch<Clock>(facet, i, e, is, err); } } diff --git a/boost/chrono/io/time_point_io.hpp b/boost/chrono/io/time_point_io.hpp index ec4ba13aeb..0cbc275c0e 100644 --- a/boost/chrono/io/time_point_io.hpp +++ b/boost/chrono/io/time_point_io.hpp @@ -125,9 +125,9 @@ namespace boost std::ios_base::iostate& err, const std::ctype<char_type>& ct) const { - int t = get_up_to_n_digits(b, e, err, ct, 2) - 1; - if (!(err & std::ios_base::failbit) && t <= 11) - m = t; + int t = get_up_to_n_digits(b, e, err, ct, 2); + if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12) + m = --t; else err |= std::ios_base::failbit; } @@ -224,8 +224,8 @@ namespace boost const std::ctype<char_type>& ct) const { int t = get_up_to_n_digits(b, e, err, ct, 3); - if (!(err & std::ios_base::failbit) && t <= 365) - d = t; + if (!(err & std::ios_base::failbit) && 1 <= t && t <= 366) + d = --t; else err |= std::ios_base::failbit; } diff --git a/boost/chrono/io/utility/ios_base_state_ptr.hpp b/boost/chrono/io/utility/ios_base_state_ptr.hpp index f7dfdddca0..15c8ac4d66 100644 --- a/boost/chrono/io/utility/ios_base_state_ptr.hpp +++ b/boost/chrono/io/utility/ios_base_state_ptr.hpp @@ -164,9 +164,10 @@ namespace boost */ T * release() BOOST_NOEXCEPT { - T const* f = get(); - reset(); - return f; + void*& pw = ios_.pword(index()); + T* ptr = static_cast<T*> (pw); + pw = 0; + return ptr; } /** |