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

Compile error in folly\test\ExpectedCoroutinesTest.cpp when compiling with /std:c++20 or later #2383

Open
NEIL-smtg opened this issue Feb 17, 2025 · 0 comments

Comments

@NEIL-smtg
Copy link

NEIL-smtg commented Feb 17, 2025

Hi, I work on Microsoft Visual C++ testing, where we regularly build popular open-source projects, including Folly, with development builds of our compiler and libraries with some particular cl options such as /std:c++20 or later.

Feel free to close this issue if there is no plan of supporting /std:c++20 or later in the future.

As I build Folly from source with /std:c++20 or later, I encountered the following error:

facebook\folly\folly\test\ExpectedCoroutinesTest.cpp(140): error C2059: syntax error: '{'
facebook\folly\folly\test\ExpectedCoroutinesTest.cpp(140): error C2143: syntax error: missing ';' before '{'
facebook\folly\folly\test\ExpectedCoroutinesTest.cpp(140): error C2059: syntax error: ')'

Repro Step:

  1. Open x64 native tools command prompt for VS2022
  2. git clone https://github.com/facebook/folly.git
  3. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 & set _CL_=/DGLOG_NO_ABBREVIATED_SEVERITIES /DNOMINMAX /DGLOG_USE_GLOG_EXPORT /std:c++latest /utf-8
  4. mkdir facebook\folly\build_amd64 & cd facebook\folly\build_amd64
  5. cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\gitP\Microsoft\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=RELEASE ..
  6. ninja -v

Full build log: folly.txt

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

No branches or pull requests

1 participant