Created attachment 364242 [details]
A paper(see attachment) voted into the C++20 working draft changes the definition of aggregate such that classes with any user-declared ctors are no longer aggregates.
The MSVC team builds WebKit regularly to detect regressions, and found this failure under our build configuration with the /std:c++latest switch. Not sure if you are interented in upstreaming it if C++20 compatibility is on the library's radar. I still reported this issue. If not, we will try "/std:c++17".
1. git clone https://github.com/WebKit/webkit d:\WebKit\src
2. open a VS 2017 x86 command prompt as admin and browse to D:\Webkit
3. extra WebKitLibrary\win to D:\WebKit\src\WebKitLibraries\win
4. set path=C:\gnuwin32\bin;%path%
5. set _CL_=/std:c++latest
6. cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DCMAKE_BUILD_TYPE=Release -DRUBY_LIBRARY=C:\Ruby25-x64\lib -DPORT="AppleWin" ..\src
7. msbuild /p:Configuration=Release;Platform=Win32 WebKit.sln /t:Rebuild
D:\WebKit\build_x86\DerivedSources\ForwardingHeaders\pal/spi/cf/CFNetworkSPI.h(26): warning C4068: unknown pragma
D:\WebKit\src\Source\WebCore\html/canvas/CanvasStyle.cpp(93): error C2440: 'initializing': cannot convert from 'initializer list' to 'WebCore::CanvasStyle::CMYKAColor'
D:\WebKit\src\Source\WebCore\html/canvas/CanvasStyle.cpp(93): note: No constructor could take the source type, or constructor overload resolution was ambiguous
D:\WebKit\src\Source\WebCore\svg/SVGComponentTransferFunctionElement.cpp(113): error C2440: 'return': cannot convert from 'initializer list' to 'WebCore::ComponentTransferFunction'
D:\WebKit\src\Source\WebCore\svg/SVGComponentTransferFunctionElement.cpp(121): note: No constructor could take the source type, or constructor overload resolution was ambiguous
WebKit is using and supporting only C++14 at the moment.
It seems this is a trivial fix and can be compatible with C++14. I think it is acceptable if you submit a proposed patch if you want to keep C++20 compil-ability.
Sorry for the late. We have applied patches for WebKit to support /std:c++latest. Once WebKit is clean in our testing, I will add a comment on this issue.
Unfortunately, there is still error C2440 in the later build, not sure if there will be more. Since C++20 raises at least 3 errors C2440, internal discussion, we will go back to using C++17. Please close this issue, thank you.
WebKit is using and supporting only C++17 at the moment.
It seems this is a trivial fix and can be compatible with C++17. I think it is acceptable if you submit a proposed patch and if you want to keep WebKit to be compiled in C++20.
Cc Lauro FYI since he just landed a fix for Bug 235023.
WebKit has migrated to C++20. I don't see these errors. Closed.
Bug 233963 – Start using C++20
Bug 233448 – [CMake][MSVC] Compile with /permissive-