+#if defined(_MSC_VER)
+// MSVC doesn't support constructor priorities. Just pray it works, I guess.
+// We could implement a link-time mechanism for MSVC,
+// via #pragma detect_mismatch but that would only handle
+// static library linking.
+# define FOLLY_VERSION_CHECK_PRIORITY(Ret, name) \
+ __pragma(section(".CRT$XCU",read)) \
+ static Ret __cdecl name(void); \
+ __declspec(allocate(".CRT$XCU")) \
+ Ret (__cdecl*name##_)(void) = name; \
+ Ret __cdecl name()
+
+#elif defined(__APPLE__)