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] Serious_Engine build failed due to error C2666: 'CValuesForPrimitive::operator ==': overloaded functions have similar conversions #55

Open
fangzhouxia opened this issue Dec 8, 2022 · 0 comments

Comments

@fangzhouxia
Copy link

Description:
After the MSVC team implented P2468R2 The Equality Operator You Are Looking For, we got a compiler error with /std:c++latest like below, the error is due to operator here https://github.com/Croteam-official/Serious-Engine/blob/master/Sources/WorldEditor/WorldEditor.h#L188 and https://github.com/Croteam-official/Serious-Engine/blob/master/Sources/WorldEditor/WorldEditor.h#L577 here needs a 'const'. Could you please look this issue? Thanks.

Reproduction steps:

  1. open VS2019 x86 tools command
  2. git clone https://github.com/Croteam-official/Serious-Engine F:\gitP\Croteam-official\Serious-Engine\Sources
  3. set CL=/std:c++latest /permissive
  4. cd F:\gitP\Croteam-official\Serious-Engine\Sources
  5. devenv /upgrade All.sln
  6. msbuild /p:Configuration=Release;Platform=Win32 /p:WindowsTargetPlatformVersion=10.0.18362.0 All.sln /t:Rebuild /m /p:BuildInParallel=true

log:
build (3).log
F:\gitP\Croteam-official\Serious-Engine\Sources\WorldEditor\DlgPgPrimitive.cpp(393): error C2666: 'CValuesForPrimitive::operator ==': overloaded functions have similar conversions
F:\gitP\Croteam-official\Serious-Engine\Sources\WorldEditor\WorldEditor.h(577): note: could be 'BOOL CValuesForPrimitive::operator ==(const CValuesForPrimitive &)'
F:\gitP\Croteam-official\Serious-Engine\Sources\Engine\Base\CTString.h(83): note: or 'BOOL operator ==(const char *,const CTString &)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\d2d1helper.h(1024): note: or 'bool operator ==(const D2D1_RECT_U &,const D2D1_RECT_U &)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\d2d1helper.h(1016): note: or 'bool operator ==(const D2D1_SIZE_U &,const D2D1_SIZE_U &)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\propkeydef.h(35): note: or 'int operator ==(const PROPERTYKEY &,const PROPERTYKEY &)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\guiddef.h(192): note: or 'bool operator ==(const GUID &,const GUID &)'

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

No branches or pull requests

1 participant