[libcxx-commits] [PATCH] D134742: [libc++][chrono] Implements formatter duration.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 18 08:59:16 PDT 2022


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM with comments!



================
Comment at: libcxx/include/__chrono/convert_to_tm.h:29-32
 // Convert a chrono calendar time point to the given tm type,
 // which must have the same properties as std::tm.
 template <class _Tm, class _ChronoCalendarTimePoint>
 _LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(const _ChronoCalendarTimePoint& __value) {
----------------
Suggestion. `_ChronoEntity` is kind of hand-wavy, but `_ChronoCalendarTimePoint` is now wrong with this new patch, so let's change it.


================
Comment at: libcxx/test/std/time/time.syn/formatter.duration.pass.cpp:553
+        std::chrono::duration<int, std::ratio<86400>>(7));
+#else
+  check(loc,
----------------
Also elsewhere.


================
Comment at: libcxx/test/std/time/time.syn/formatter.duration.pass.cpp:664
+
+#endif
+  std::locale::global(std::locale::classic());
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134742



More information about the libcxx-commits mailing list