Speculatively implement LWG-4139 [time.zone.leap] recursive constraint in <=>
by frederick-vs-ja · Pull Request #4902 · microsoft/STL (original) (raw)
LWG-4139 indicated constraint recursion in the current specification of the operator<=>
for leap_second
and sys_time
, which is not yet revealed due to the bugs in MSVC and (old versions of) Clang.
Although the proposed resolution is not shown in the LWG issue, I think the necessary changes are clear enough - just moving the operator functions from the synopsis of <chrono>
to that of std::chrono::leap_second
and adding friend
.
This has been done in libstdc++ years ago (gcc-mirror/gcc@1736bf5), and recently in libc++ via LLVM-104713.