From 271977282fe30d3c351b5e8a6f1692d743996ed1 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Fri, 15 Sep 2017 14:21:45 -0700 Subject: [PATCH] Fix coroutine feature test macro on MSVC Summary: Coroutines are only available on MSVC when the /await compiler switch was passed, in which case the `_RESUMABLE_FUNCTIONS_SUPPORTED` macro is defined. Reviewed By: Orvid Differential Revision: D5837303 fbshipit-source-id: af3349646e8875e3eac1bc3bbf47203f41f0bbde --- folly/Portability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/Portability.h b/folly/Portability.h index 87be0b29..060085c3 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -426,6 +426,6 @@ constexpr auto kMscVer = 0; #define FOLLY_CPP14_CONSTEXPR inline #endif -#if __cpp_coroutines >= 201703L || _MSC_VER +#if __cpp_coroutines >= 201703L || (_MSC_VER && _RESUMABLE_FUNCTIONS_SUPPORTED) #define FOLLY_HAS_COROUTINES 1 #endif -- 2.34.1