From: Eric Niebler Date: Fri, 15 Sep 2017 21:21:45 +0000 (-0700) Subject: Fix coroutine feature test macro on MSVC X-Git-Tag: v2017.09.18.00^0 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=271977282fe30d3c351b5e8a6f1692d743996ed1;p=folly.git 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 --- 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