tmxlite
tmxlite copied to clipboard
Compiler error on SFMLOrthogonalLayer.hpp
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
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?
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.
OK thanks, I'll take a look when I can.
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!