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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 29 11:57:10 PST 2022


Mordante marked an inline comment as done.
Mordante 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
+
----------------
mclow.lists wrote:
> 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?
Good catch, I've applied your suggestion.


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