Allow silencing the experimental coroutine warning #2132
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an option macro to allow users to silence the experimental coroutine warning.
Some third-party libraries (such as
cppwinrt
) are very slow to distribute new versions. The latest version ofcppwinrt
currently included in theWindows SDK
isv2.0.200609.3
, which was released on (9 Jun 2020).In the older version of these libraries (the latest distributed version), it still use the
<experimental/coroutine>
header. Therefore, if we bump our own projects to C++20, this warning will always prevent compilation.Using a released but undistributed version sometimes doesn't work, for example
cppwinrt
, if we use the local version it will require installation through theNuget
package manager, which is almost impossible to do inCMake
.For more information on this problem in
cppwinrt
, see microsoft/cppwinrt#866.This PR should not break any existing code, and the
<experimental/coroutine>
header should work well with the standard<coroutine>
header, since they have different namespaces. But I'm not sure the naming of that option macro is appropriate.