[libcxx-commits] [PATCH] D138826: [libc++][chrono] Fixes formatter duration.

Marshall Clow via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 28 08:44:09 PST 2022


mclow.lists added inline comments.


================
Comment at: libcxx/test/std/time/time.syn/formatter.duration.pass.cpp:1093
+  check(SV("15:11:42"), SV("{:%T}"), std::chrono::months{542'287});                        // 20 bit signed value max
+  check(SV("12:18:00"), SV("{:%T}"), std::chrono::years{65'565});                          // 17 bit signed value max
+
----------------
Are you sure this number shouldn't be `65'535` (aka `0FFFF`)?

Wouldn't it be better to write them all in hex, so it's clear what they're represententing?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138826



More information about the libcxx-commits mailing list