Don't skip white space by default in from_stream.

* Put a space at the beginning of your
  format string to recover this behavior.
This commit is contained in:
Howard Hinnant
2017-05-04 14:47:28 -04:00
parent e8f0dca452
commit f57432d7b4

2
date.h
View File

@@ -5448,7 +5448,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
{
using namespace std;
using namespace std::chrono;
typename basic_istream<CharT, Traits>::sentry ok{is};
typename basic_istream<CharT, Traits>::sentry ok{is, true};
if (ok)
{
auto& f = use_facet<time_get<CharT>>(is.getloc());