Summary:
MSVC is being grumpy, and I want to continue to work from the preview build, so commit the workaround, as there's no significant difference.
Upstream bug report: https://developercommunity.visualstudio.com/content/problem/59614/compiler-crash-when-constexpr-constructing-stdchro.html
Reviewed By: yfeldblum
Differential Revision:
D5099876
fbshipit-source-id:
64d5573d78b14339ff3177dd910a22787463ccd2
}
const auto unanosToTimespec = [](timespec* tp, unsigned_nanos t) -> int {
- static constexpr unsigned_nanos one_sec(std::chrono::seconds(1));
+ static constexpr unsigned_nanos one_sec{std::chrono::seconds(1)};
tp->tv_sec =
time_t(std::chrono::duration_cast<std::chrono::seconds>(t).count());
tp->tv_nsec = long((t % one_sec).count());