Commit f9da986c authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Work around a compiler crash in VS 2017.3 Preview 1

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
parent 58104722
......@@ -215,7 +215,7 @@ extern "C" int clock_gettime(clockid_t clock_id, struct timespec* tp) {
}
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());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment