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

[MSVC][std:c++latest] Cinder failed to build due to error C2666: 'CRect::operator ==': overloaded functions have similar conversions #2302

Open
Zhaojun-Liu opened this issue Dec 7, 2022 · 1 comment
Labels

Comments

@Zhaojun-Liu
Copy link

Zhaojun-Liu commented Dec 7, 2022

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:

  1. open VC2019 x64 tools command
  2. git clone https://github.com/cinder/Cinder F:\gitP\cinder\Cinder
  3. mkdir F:\gitP\cinder\Cinder\build_amd64
  4. cd F:\gitP\cinder\Cinder\build_amd64
  5. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -DCINDER_BUILD_TESTS=ON ..
  6. set CL= /std:c++latest /D_HAS_DEPRECATED_UNCAUGHT_EXCEPTION=1 /D_SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING
  7. msbuild /m /p:Platform=x64 /p:Configuration=Release cinder.sln /t:Rebuild > build.log

Detailed log:
build.log

@vinhnguyen500
Copy link

This is also reproducible with a Visual Studio 17 2022 generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants