Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ 20: Move vnext to C++ 20 and C++ 20 coroutines #12331

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

NickGerleman
Copy link
Collaborator

@NickGerleman NickGerleman commented Nov 1, 2023

This moves projects in vnext to build with C++ 20 and C++ 20 coroutines. This should not impact the ABI of MSRN DLLs, but may need care for cases of Folly at legacy ABI boundary.

  1. Set <CppStandard>stdcpp20</CppStandard> in React.cpp.props
  2. Remove explicit usages of /await to opt into coroutines TS
  3. Replace std::experimental::coroutine_handle with std::coroutine_handle

This depends on the earlier changes being merged, along with the rest of the std::future usages as a coroutine return type replaced (e.g. with winrt types).

Also needed to bump Folly version due to facebook/folly@d62707b.

Microsoft Reviewers: Open in CodeFlow

This moves projects in vnext to build with C++ 20 and C++ 20 coroutines. This should not impact the ABI of MSRN DLLs, but may need care for cases of Folly at legacy ABI boundary.

1. Set `<CppStandard>stdcpp20</CppStandard>` in `React.cpp.props`
2. Remove explicit usages of `/await` to opt into coroutines TS
3. Replace `std::experimental::coroutine_handle` with `std::coroutine_handle`
@NickGerleman
Copy link
Collaborator Author

NickGerleman commented Nov 1, 2023

@vmoroz after the other PRs are merged, I think the only thing we have left to do before this is to convert a few remaining usages of std::future, not addressed in #12327.

I'm going to leave this for you all to be able to pick up the rest (I do not have a well-used Windows dev machine, which has made this change a bit annoying). I think the bulk of the work should be done though.

@vmoroz
Copy link
Member

vmoroz commented Nov 1, 2023

@vmoroz after the other PRs are merged, I think the only thing we have left to do before this is to convert a few remaining usages of std::future, not addressed in #12327.

I'm going to leave this for you all to be able to pick up the rest (I do not have a well-used Windows dev machine, which has made this change a bit annoying). I think the bulk of the work should be done though.

@NickGerleman , thank you for implementing the change!

@chiaramooney
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants