[Bug libstdc++/114260] std::formatter> formats as the previous day

2024-03-07 Thread howard.hinnant at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114260 --- Comment #2 from Howard Hinnant --- This: 2024-03-05 00:00:00 2024-03-04 23:59:33 looks like correct output to me. sys_time and utc_time map to the same civil calendar date/time (except during a leap second). That is 2024-03-05 00:00:00

[Bug libstdc++/114244] Need to use round when parsing fractional seconds

2024-03-06 Thread howard.hinnant at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114244 --- Comment #4 from Howard Hinnant --- Not positive (because I don't know your code that well), but I think: __s = round<_Duration>(__fs); will do it.

[Bug libstdc++/114244] New: Need to use round when parsing fractional seconds

2024-03-05 Thread howard.hinnant at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: howard.hinnant at gmail dot com Target Milestone: --- I'm not sure if this is a bug or just QOI. But consider: #include #include #include using time_point_t = std::chrono::sys_time; time_point_t decrypt(std

[Bug libstdc++/114240] sys_days not being parsed with only a date in the stream

2024-03-05 Thread howard.hinnant at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114240 --- Comment #2 from Howard Hinnant --- In my date lib I just presumed 00:00:00 time of day when parsing time_points, unless the parse produced another time of day. Though I must admit that this didn't come through in the spec. So there is a

[Bug libstdc++/114240] New: sys_days not being parsed with only a date in the stream

2024-03-05 Thread howard.hinnant at gmail dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: howard.hinnant at gmail dot com Target Milestone: --- #include #include #include int main(int argc, char**argv){ std::istringstream ssStart{"2024-01-01"}; std::ist

[Bug libstdc++/78714] std::get_time / std::time_get::get does not accept full month name in %b

2020-01-26 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78714 Howard Hinnant changed: What|Removed |Added CC||howard.hinnant at gmail dot com

[Bug libstdc++/71367] std::time_get does not implement 'r' or 'p'

2019-06-10 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71367 --- Comment #2 from Howard Hinnant --- Just so this point doesn't go unnoticed, parsing should be case-insensitive.

[Bug libstdc++/81468] New: is_constructible gives the wrong answer for time_point construction

2017-07-17 Thread howard.hinnant at gmail dot com
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: howard.hinnant at gmail dot com Target Milestone: --- This should compile, but does not: #include #include template using sys_time = std::chrono::time_point<std::chr

[Bug c++/67631] brace initialization bug

2016-11-18 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67631 --- Comment #10 from Howard Hinnant --- Thanks much Jason!

[Bug c++/67631] brace initialization bug

2016-11-14 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67631 --- Comment #6 from Howard Hinnant --- Dropping the `explicit` specifier for the operator is an "over my dead body", sorry. That would be horrible. The next best workaround is to "respell" the explicit int operator() as `as_int() const`. But

[Bug c++/67631] brace initialization bug

2016-11-14 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67631 --- Comment #4 from Howard Hinnant --- This bug needs some attention because Howard Hinnant's date library is making it common for people to hit this bug. The date library: https://github.com/HowardHinnant/date This library is sufficiently

[Bug libstdc++/55917] Impossible to find/debug unhandled exceptions in an std::thread

2016-06-20 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55917 --- Comment #15 from Howard Hinnant --- To help clarify my proposal, here is a patch: diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc index 906cafa..cfca178 100644 --- a/libstdc++-v3/src/c++11/thread.cc +++

[Bug libstdc++/55917] Impossible to find/debug unhandled exceptions in an std::thread

2016-05-20 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55917 Howard Hinnant changed: What|Removed |Added CC||howard.hinnant at gmail dot com

[Bug libstdc++/68190] [5/6 Regression] iterator mix up with set::find and heterogenous lookup

2015-11-03 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68190 --- Comment #9 from Howard Hinnant --- Untested fix suggested: #if __cplusplus > 201103L template auto

[Bug libstdc++/68190] New: iterator mix up with set::find and heterogenous lookup

2015-11-02 Thread howard.hinnant at gmail dot com
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: howard.hinnant at gmail dot com Target Milestone: --- This fails to compile because template set::find is returning the wrong iterator type (I think). #include struct Comparator { using

[Bug libstdc++/68190] iterator mix up with set::find and heterogenous lookup

2015-11-02 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68190 --- Comment #2 from Howard Hinnant --- LWG 103 isn't the issue. http://melpon.org/wandbox/permlink/MzOWaFpvFRtgaa7t C::iterator is std::_Rb_tree_const_iterator C::const_iterator is std::_Rb_tree_const_iterator C::find(1u) returns

[Bug c++/67631] New: brace initialization bug

2015-09-18 Thread howard.hinnant at gmail dot com
: unassigned at gcc dot gnu.org Reporter: howard.hinnant at gmail dot com Target Milestone: --- I expect this program to compile and not assert when run: #include template void test(const U& uo) { T t{uo}; U u{t}; assert(u == uo); t = T{uo}; u = U{t}; asse

[Bug libstdc++/54316] [C++11] move constructor for stringstream

2014-03-19 Thread howard.hinnant at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316 --- Comment #8 from Howard Hinnant howard.hinnant at gmail dot com --- Here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1862.html#27.4.4%20-%20Class%20template%20basic_ios is a good list of what needs to be done. It is an old

[Bug libstdc++/54316] [C++11] move constructor for stringstream

2014-03-18 Thread howard.hinnant at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316 Howard Hinnant howard.hinnant at gmail dot com changed: What|Removed |Added CC