[libc++] Avoid <climits> dependency in <thread>
authorJoerg Sonnenberger <joerg@bec.de>
Thu, 18 Feb 2021 14:15:53 +0000 (15:15 +0100)
committerJoerg Sonnenberger <joerg@bec.de>
Wed, 31 Mar 2021 13:28:16 +0000 (15:28 +0200)
commit9f4022ffeb20eff91c7461828592dc812ee5a28e
tree62050dbe8fd32362abd1ea3ed837ec93378aaad8
parentffcb4b43b799f518891088076ef083ca8f13c537
[libc++] Avoid <climits> dependency in <thread>

The standard guarantees sleep durations of 2^63-1 nanoseconds to work.
Instead of depending on INT64_MAX or ULONGLONG_MAX to exist via the
header pollution, fold the constant directly. That has the additional
positive side effect that it avoids long double arithmetic bugs in GCC.

Differential Revision: https://reviews.llvm.org/D99516
libcxx/include/thread