The build from sources fails when building qtbase of Qt 6.2.0 with MSVC 2019 v16.11.4 in c++20 mode on Windows.
When configuring the build of qtbase with:
The build fails in:
With error: error C2101: '&' on constant
Snippet of the source code:
Returning address of dummySubject in lambda function causes the build to fail when the dummySubject is constexpr, removing constexpr solves the issue.
Issue does not reproduce with:
The issue is not evident in minGW nor GCC either.
Please find the reproducer at: