[MSVC][std:c++latest] Cinder failed to build due to error C2666: 'CRect::operator ==': overloaded functions have similar conversions
Description: After the MSVC team implemented P2468R2 The Equality Operator You Are Looking For, we got a compiler error with /std:c++latest like below, the error is due to the equality operator here https://github.com/cinder/Cinder/blob/master/src/AntTweakBar/TwMgr.h#L369 needs a 'const'. Could you please look this issue? Thanks.
F:\gitP\cinder\Cinder\src\AntTweakBar\TwMgr.cpp(2176,71): error C2666: 'CRect::operator ==': overloaded functions have similar conversions [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
Note: this issue will be reproduced on next release version of VS(VS17.6 or later)
Repro steps:
- open VC2019 x64 tools command
- git clone https://github.com/cinder/Cinder F:\gitP\cinder\Cinder
- mkdir F:\gitP\cinder\Cinder\build_amd64
- cd F:\gitP\cinder\Cinder\build_amd64
- cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -DCINDER_BUILD_TESTS=ON ..
- set CL= /std:c++latest /D_HAS_DEPRECATED_UNCAUGHT_EXCEPTION=1 /D_SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING
- msbuild /m /p:Platform=x64 /p:Configuration=Release cinder.sln /t:Rebuild > build.log
Detailed log: build.log
This is also reproducible with a Visual Studio 17 2022 generator