![]() |
|
Deprecated C++ function used in Dolphin source code - Printable Version +- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org) +-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support) +--- Forum: Development Discussion (https://forums.dolphin-emu.org/Forum-development-discussion) +--- Thread: Deprecated C++ function used in Dolphin source code (/Thread-deprecated-c-function-used-in-dolphin-source-code) |
Deprecated C++ function used in Dolphin source code - TheNarcor - 07-04-2020 Hi, I'm new here and wish to report a bug. If this is not the correct site for this, please correct me. Was building Dolphin from source in VS2019 and came across build errors due to the use of the function std::result_of which is deprecated in newer versions of C++. I was able to work around the issue by modifying the source code myself and replacing all instances of the deprecated function with std::invoke_result, related StackOverflow page here. Happy to provide more information as needed. This issue affects compilation of all Config versions (Release/Debug, x64/ARM64), and I am building on Windows. Hoping to save someone the trouble of debugging this down the line! RE: Deprecated C++ function used in Dolphin source code - JosJuice - 07-04-2020 This is a known problem. The only instances of std::result_of that are left right now are the ones in Qt. So it should work fine as long as you manually install the latest version of Qt and configure the Dolphin build to use it. We haven't gotten around to updating the Externals Qt yet, unfortunately... RE: Deprecated C++ function used in Dolphin source code - Modception - 07-16-2020 I found you can also install the previous toolset 14.25.28610 from the installer and then change a VS2019 file so VS defaults to using it. A bad idea if you're working with more repos than just dolphin, because it will always use 14.25. Won't change any build files. Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v142.default.props Not sure if there's a different way to change it for just dolphin WITHOUT changing any build files. Otherwise, it's a huge hassle having to keep switching toolset versions when trying to PR stuff. RE: Deprecated C++ function used in Dolphin source code - chrisis123 - 07-19-2020 (07-04-2020, 05:21 AM)TheNarcor Wrote: Hi, I'm new here and wish to report a bug. If this is not the correct site for this, please correct me. At this time there is exactly one occurence of std::result_of left in the provided Qt files - obviously you can just build either against the old platform toolset or point VS to a newer Qt version, for a quick fix it's also enough (albeit hacky obviously) to replace the single occurence in the file \Externals\Qt\Qt5.14.1\msvc2019_64\include\QtCore\qobjectdefs.h (if building for win64) with std::invoke_result |