Commit 3af93759 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Split definition of kMscVer from kIsWindows

Summary: [Folly] Split definition of `kMscVer` from `kIsWindows` and use in `hazptr`.

Reviewed By: mzlee

Differential Revision: D7027159

fbshipit-source-id: 1dd2bad821919a2d579aa615ecb2921e5a3ce4d8
parent 66a6916f
......@@ -341,9 +341,13 @@ constexpr auto kIsLinux = false;
#if defined(_WIN32)
constexpr auto kIsWindows = true;
constexpr auto kMscVer = _MSC_VER;
#else
constexpr auto kIsWindows = false;
#endif
#if _MSC_VER
constexpr auto kMscVer = _MSC_VER;
#else
constexpr auto kMscVer = 0;
#endif
} // namespace folly
......
......@@ -314,7 +314,7 @@ class hazptr_priv {
};
static_assert(
folly::kIsWindows || std::is_trivial<hazptr_priv>::value,
folly::kMscVer || std::is_trivial<hazptr_priv>::value,
"hazptr_priv must be trivial to avoid a branch to check initialization");
void hazptr_priv_init();
......
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