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

Compiler error on SFMLOrthogonalLayer.hpp #102

Open
rohanharikr opened this issue Sep 11, 2021 · 4 comments
Open

Compiler error on SFMLOrthogonalLayer.hpp #102

rohanharikr opened this issue Sep 11, 2021 · 4 comments

Comments

@rohanharikr
Copy link

rohanharikr commented Sep 11, 2021

Is it just me or is anyone else experiencing this issue? I'm on VS 19 Community Edition.

Severity	Code	Description	Project	File	Line	Suppression State	Detail Description
Error (active)	E0349	no operator "==" matches these operands	tmxlite_test	C:\Users\Rohan\source\repos\tmxlite_test\MapLayer.h	141
operand types are: const tmx::Tileset::Tile::Animation::Frame == tmx::Tileset::Tile::Animation::Frame


Severity	Code	Description	Project	File	Line	Suppression State
Error	C2678	binary '==': no operator found which takes a left-hand operand of type 'const tmx::Tileset::Tile::Animation::Frame' (or there is no acceptable conversion)	tmxlite_test	C:\Users\rohanharikr\source\repos\tmxlite_test\MapLayer.h	141	

@fallahn
Copy link
Owner

fallahn commented Sep 12, 2021

It appears the compiler is complaining about a non-const reference in the comparison, but I don't understand exactly why. The animation operator here is defined with a const reference as per CPP Reference. Could you share some of your code or maybe explain a bit more about what you're doing so I can try and recreate the problem?

@rohanharikr
Copy link
Author

Thanks for the response @fallahn. I didn't write any code, just opened up your SFML example in VS. Not sure if the following information might be helpful, but I added tmxlite and SFML with vcpkg targeting 32 bit.

@fallahn
Copy link
Owner

fallahn commented Sep 14, 2021

OK thanks, I'll take a look when I can.

@fallahn
Copy link
Owner

fallahn commented Sep 20, 2021

A small update: I've tried building the SFML example as included with the Visual Studio solution in the repository and it seems to work OK. I'm not familiar with vcpkg, so maybe it's an issue with version mismatch? Could you perhaps try cloning the repository and build the current revision to see if the problem exists? Thanks!

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

2 participants