release build compile errors with XorStr due to c++20 std::format changes
hsurk opened this issue · 4 comments
hsurk commented
Building the solution for release with the "Use Debug Libraries" option set to No, throws the following error concerning XorStr;
- C3615 constexpr function 'jm::make_xorstr' cannot result in a constant expression (compiling source file core\hooks.cpp)
I can build with debug libraries because DEBUG redefines the XorStr() function so it doesn't crypt.
Skeng1337 commented
same thing, can we get a fix? pls
l1m0n3 commented
Recent std::format
update is causing this issue. (now format strings must be known at compile time.)
You can use std::vformat
instead for the fix.
Example: std::vformat(XorStr("Hello {}!"), std::make_format_args(XorStr("World")));
See: microsoft/STL#2735 (comment)
rollraw commented
yes, exactly what im doing now. will push commit soon.
thanks anyway