-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingchronoC++20 chronoC++20 chronofixedSomething works now, yay!Something works now, yay!
Description
Command-line test case
C:\Users\He\source\test>type chronat.cpp
#include <chrono>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <string>
using namespace std;
using namespace std::chrono;
int main() {
try {
utc_clock::time_point t;
if (istringstream{"2021-08-28 00:00:60"} >> parse("%F %T"s, t)) {
cout << t << "\n";
} else {
cout << "parse failed\n";
}
} catch (const exception& e) {
cout << "error: " << e.what() << "\n";
}
return 0;
}C:\Users\He\source\test>cl /EHsc /W4 /WX /std:c++20 chronat.cpp
用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.32.31328 版
版权所有(C) Microsoft Corporation。保留所有权利。
chronat.cpp
Microsoft (R) Incremental Linker Version 14.32.31328.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:chronat.exe
chronat.obj
C:\Users\He\source\test>.\chronat.exe
2021-08-28 00:00:59.0000000
Expected behavior
Prints either "parse failed" or "2021-08-28 00:00:59.9999999", depending on the design choice.
STL version
Microsoft Visual Studio Community 2022 (64 位) - Preview
版本 17.2.0 Preview 5.0
doomlaur
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingchronoC++20 chronoC++20 chronofixedSomething works now, yay!Something works now, yay!