Commit cdb43e93 authored by Christoph Purrer's avatar Christoph Purrer Committed by Facebook GitHub Bot

Allow to opt into <experimental/coroutine> when <coroutine> is available

Summary:
- For Windows in xplat we use [Clang9/12 + MSVC 2017](https://www.internalfb.com/code/search?q=filepath%3Afbsource%2Ftools%2Fbuckconfigs%2Fcxx%2Fwindows%20repo%3Afbsource%20vs2017_15.9) and it's [<experimental/coroutine>](https://www.internalfb.com/phabricator/paste/view/P467028969)
- When upgrading to MSVC 2019 we also get [<coroutine>](https://www.internalfb.com/phabricator/paste/view/P467029007) in addition to  [<experimental/coroutine>](https://www.internalfb.com/phabricator/paste/view/P467029069)
- The MSVC2019 ```<coroutine>``` does not work with our current Windows [coroutine solution](https://fb.workplace.com/groups/rp.co.await/permalink/748274059391415/) / [D26877884](https://www.internalfb.com/diff/D26877884)
- Hence I am *re-using* an existing flag to opt-out of ```<coroutine>``` as MSVC 2019 left for backwards compatibility also ```<experimental/coroutine>```

Reviewed By: yfeldblum

Differential Revision: D32282445

fbshipit-source-id: d2eeb3057518e95135cf054ab6156dac5aa15065
parent 8f26eb68
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#if FOLLY_HAS_COROUTINES #if FOLLY_HAS_COROUTINES
#if __has_include(<coroutine>) #if __has_include(<coroutine>) && !defined(LLVM_COROUTINES)
#include <coroutine> #include <coroutine>
#else #else
#include <experimental/coroutine> #include <experimental/coroutine>
...@@ -51,7 +51,7 @@ class exception_wrapper; ...@@ -51,7 +51,7 @@ class exception_wrapper;
namespace folly::coro { namespace folly::coro {
#if __has_include(<coroutine>) #if __has_include(<coroutine>) && !defined(LLVM_COROUTINES)
namespace impl = std; namespace impl = std;
#else #else
namespace impl = std::experimental; namespace impl = std::experimental;
......
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