This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Jul 2017 10:05:10 +0000
- Subject: [Bug libstdc++/45896] [C++0x] Facet time_get not reading dates according to the IEEE 1003 standard.
- Auto-submitted: auto-generated
- References: <bug-45896-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45896
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Another testcase from PR 71556:
#include <iostream>
#include <sstream>
#include <locale>
#include <iomanip>
int main()
{
std::tm t = {};
std::istringstream ss("9");
ss.imbue(std::locale("C.UTF-8"));
ss >> std::get_time(&t, "%H");
if (ss.fail()) {
std::cout << "Parse failed\n";
} else {
std::cout << std::put_time(&t, "%c") << '\n';
}
}