[libcxx-commits] [PATCH] D139771: [libc++][chrono] Add hh_mm_ss formatter.

H. Vetinari via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 24 16:20:09 PST 2023


h-vetinari added inline comments.


================
Comment at: libcxx/include/__chrono/formatter.h:522-523
+        //   - or write the number of days.
+        if (__specs.__chrono_.__hour_ && __value.hours().count() > 23)
+          std::__throw_format_error("formatting a hour needs a valid value");
+
----------------
For [[ https://en.wikipedia.org/wiki/Leap_second | leap seconds ]], it would be legal to have a duration of a day take `24:00:01`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139771/new/

https://reviews.llvm.org/D139771



More information about the libcxx-commits mailing list