Commit a47a5531 authored by Andrew Krieger's avatar Andrew Krieger Committed by Facebook Github Bot

Gate hazptr static_assert which is guaranteed to fail in MSVC

Summary:
std::atomic is no longer trivial, and VS2015 and VS2017 both
fail this static assert, as will future versions of conforming compilers.
Updates to folly mean that the hazptr header is transitively included in
more places which makes it easier to trip this even when not using hazptr.
Disabling this assert to visual studio at least saves users a headache.

Reviewed By: yfeldblum, magedm

Differential Revision: D7006587

fbshipit-source-id: 8481e1d5668aee8cab703a04b2a390550c210a2c
parent cf18a86f
...@@ -314,7 +314,7 @@ class hazptr_priv { ...@@ -314,7 +314,7 @@ class hazptr_priv {
}; };
static_assert( static_assert(
std::is_trivial<hazptr_priv>::value, folly::kIsWindows || std::is_trivial<hazptr_priv>::value,
"hazptr_priv must be trivial to avoid a branch to check initialization"); "hazptr_priv must be trivial to avoid a branch to check initialization");
void hazptr_priv_init(); 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