When using "Read solution model direct from project/solution files", c++17 standard is not recognized.
Similar problem -> std:c++17 option in unreal project – ReSharper Support | JetBrains
My working environment is as follows.
Visual studio : 17.0.2
Resharper : 2021.3
Unreal Engine : 4.27.2
Please tell me how to solve this problem.
Please sign in to leave a comment.
Hello,
I've failed to reproduce this issue locally (with ReSharper 2021.3 and Unreal Engine 4.27.2 installed from Epic Games Launcher).
Could you please provide some details:
Hello.
1. CppStandard is set to Cpp17 in BuildConfiguraion.xml.
2. "Use Unreal Engine project model" option is enabled.
3. In the project json file, CppStandard is Cpp17.
Additionally, I am using the source version of the Unreal Engine.
That's strange. Basically ReSharper reads C++ standard version from this json file.
Could you please:
Also what exactly C++17 feature is not working?
Thanks in advance!
Here is the dump result.
And it is the "if init syntax" and "template argument deduction syntax" where the problem occurred.
I've managed to reproduce this issue on my side. It appears that it is caused be several bugs.
Firstly there is an issue in UnrealBuildTool. In generated .vcxproj file there is following data which sets C++ version for IntelliSense:
But since UE 4.27.2 it also contains following element:
It sets precompiled header for each .cpp file and it clears whatever other options were set for it (including C++ version).
I'll take a look at what can be done here but the fix should be in the UnrealBuildTool.
Second issue is that we're using C++ settings from .vcxproj file and not from .json (despite enabled option in the settings). This line tells us about that:
I'm not sure why that happens though we're chasing one known random bug which causes this: RSCPP-30911.
If you could collect verbose logs and share them with us it might help us in investigating this issue. The instruction on how to collect logs can be found here: How-to-run-ReSharper-with-logging. File with logs can be attached in YouTrack ticket with jetbrains-team visibility.
And the last one - there is a workaround:
It applies to the specific project and it will override C++ version for ReSharper no matter what is written in .vcxproj and .json files.
Thank you again and sorry for inconvenience!
Hmm... It's going to be annoying and difficult.
I will override CppStarndard for now.
Thank you for helping me.
I have filled a bug report here: UE-137267
And apparently it was fixed but only in ue5 branch: https://github.com/EpicGames/UnrealEngine/commit/3744d4e088c8613c2e1a99e081849d648ecfdc94
If you're using source build - it should be possible to cherry-pick and back-port this fix.