What versions of C++ are compatible with UE?

I was wondering if C++20 is compatible with UE4, or just basic C++?

you may use c++/latest, but it will only work for platforms where your compiler supports it.

Afaik by defaul c++11 is enabled, as it’s the greatest version that is supported by all possible target platforms.

If you don’t want any problems with compatibility (including some 3rd party plugins), then it’s reasonable to keep default version set. If you going for pc only\research purposes, then i think c++/latest is a possible choise.

This setting is a per-project and is set in YOURPROJECT.build.cs, like

CppStandard = CppStandardVersion.Cpp14; //another possible options are "Cpp17", "Latest", not sure about 20 
2 Likes

According to the Epic C++ Coding Standard for Unreal Engine 5.0 Documentation the minimum version is C++ 17:

For UE 4.27 and 4.26 the recommended version is C++ 14

1 Like

I will be using UE 5. I know C++20 is compatible with VS Code, and I am only using it for PC, not cross platform. Does that make a difference?