Skip to content

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

Closed
Nick Gerleman (NickGerleman) wants to merge 12 commits into
microsoft:mainfrom
NickGerleman:vnext-cpp20
Closed

Nick Gerleman (NickGerleman) wants to merge 12 commits into
microsoft:mainfrom
NickGerleman:vnext-cpp20

Conversation

@NickGerleman

@NickGerleman Nick Gerleman (NickGerleman) commented Nov 1, 2023 •

Copy link
Copy Markdown
Contributor

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 meta/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

Nick Gerleman (NickGerleman) commented Nov 1, 2023 •

Copy link
Copy Markdown
Contributor Author

Vladimir Morozov (@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
Copy Markdown
Member

Vladimir Morozov (@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.

Nick Gerleman (@NickGerleman) , thank you for implementing the change!

@chiaramooney

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 1 pipeline(s).

@vmoroz

Copy link
Copy Markdown
Member

Thank you Nick Gerleman (@NickGerleman) for contributing this PR. It seems that the related issues have been addressed after this PR is created:

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