Fix folly::Function under C++17 exception specifier rules
[folly.git] / folly / Portability.h
index be5960d202b650362a9e631aa37789e881a3210f..15f393e0be911d2f8eacb252ddc1bad9a362f07b 100644 (file)
@@ -429,3 +429,8 @@ constexpr auto kMscVer = 0;
 #if __cpp_coroutines >= 201703L || (_MSC_VER && _RESUMABLE_FUNCTIONS_SUPPORTED)
 #define FOLLY_HAS_COROUTINES 1
 #endif
+
+// MSVC 2017.5
+#if __cpp_noexcept_function_type >= 201510 || _MSC_FULL_VER >= 191225816
+#define FOLLY_HAVE_NOEXCEPT_FUNCTION_TYPE 1
+#endif