folly
folly copied to clipboard
Compile error in folly\test\ExpectedCoroutinesTest.cpp when compiling with /std:c++20 or later
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:
- Open x64 native tools command prompt for VS2022
- git clone https://github.com/facebook/folly.git
- 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
- mkdir facebook\folly\build_amd64 & cd facebook\folly\build_amd64
- 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 ..
- ninja -v
Full build log: folly.txt