[libcxx-commits] [PATCH] D133490: [libc++] Fix compilation error on platforms that don't implement std::tm
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 8 12:34:41 PDT 2022
ldionne marked an inline comment as done.
ldionne added a comment.
In D133490#3777447 <https://reviews.llvm.org/D133490#3777447>, @Mordante wrote:
> Which platforms don't have `tm` that we support? Can we add a CI for them?
Apple's DriverKit is an example of that. Adding CI for that is on my todo list, but there's some stuff that needs to happen before that can be done.
================
Comment at: libcxx/include/__chrono/convert_to_tm.h:31
# endif
-
- if constexpr (same_as<_Tp, chrono::day>)
- __result.tm_mday = static_cast<unsigned>(__value);
- else
- static_assert(sizeof(_Tp) == 0, "Add the missing type specialization");
-
+ __result.tm_mday = static_cast<unsigned>(__value);
return __result;
----------------
Mordante wrote:
> Why is this change? As mentioned during our review it looks a bit odd now. However this function will get support for all chrono types that are formattable. An example of the "final" version can be seen in the function `__make_tm`
> in https://reviews.llvm.org/D126592#change-qGrpldbZrZTa .
Oh, yes, you're right. I'll undo that part.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133490/new/
https://reviews.llvm.org/D133490
More information about the libcxx-commits
mailing list