OpenVicProject / OpenVic-Dataloader

Dataloader submodule for OpenVic that is responsible for parsing both Paradox Victoria 2 data files and custom OpenVic data files.
MIT License
9 stars 2 forks source link

`error C2676: binary '/': 'const lexyd:_lit<unsigned char,126>' does not define this operator` on MSVC #31

Closed GraCoder closed 10 months ago

GraCoder commented 10 months ago

cmd_dUD8vgfi6n

Spartan322 commented 10 months ago

Could you please provide the full logs and the version of the compiler you're using.

GraCoder commented 10 months ago

1.txt devenv_AdwHhSaNa6

Spartan322 commented 10 months ago

I need to know if your dev environment is using the latest MSVC, your system might be selecting another version of MSVC installed on your system, could you open the visual studio developer command prompt and give me the result of cl? Though maybe that won't work because scons finds the wrong version despite the VS 2022 being installed...hmmm.

GraCoder commented 10 months ago

cmd_aLKLyziLH4

Spartan322 commented 10 months ago

I don't have a windows machine I can test this on, I can only recommend you use mingw or clang for now: scons use_mingw=yes or scons use_llvm=yes

Spartan322 commented 10 months ago

It appears to be fault of the Visual C++ compiler version 19.38 is now violating the C++ standard that the previous version once followed. Fixing this would require reimplementing the behavior found in make_range to comply with this new behavior in the compiler's new version.

GraCoder commented 10 months ago

make no sense to me , the same code i copyed to another test project works fine. 5DKTyABuQx

i move the #include "SimpleGrammar.hpp" to the bottom it worked. so i assume its the your code mess with lexy

5DKTyABuQx

GraCoder commented 10 months ago

wrong pic this one cmd_tFLGK7abOA

Spartan322 commented 10 months ago

This only started being reported as a problem in Visual C++ 19.38, every case for which it has occurred has only been on that version of the compiler, it does not appear in GCC or Clang and neither does it appear before Visual C++ 19.38, so this is a compiler regression violating the C++ standard that was previously acceptable. Also why is there a red error squiggle following the SimpleGrammar.hpp? As well it should be corrected to #include "v2script/SimpleGrammar.hpp" honestly. But there should be no reason for what is currently in the repo to not compile, there especially should be no reason for changing where SimpleGrammar.hpp's include is should fix this issue either.

Spartan322 commented 10 months ago

For now #33 fixes this issue, should later investigate why this is happening and a make a less hacky fix.