Using C++20 Ranges in UE4

Is it possible to use the C++20 Ranges library in the latest version of UE4? I set CppStandard = CppStandardVersion.Latest in the Target.cs file and did a clean build, but I’m still getting " ‘ranges’ is not a member of ‘std’ " when attempting to use std::ranges::any_of, which is definitely a supported method in the latest version of VS2019.

Did you #include <ranges>?

Try adding
CppStandard = CppStandardVersion.Cpp20
or
CppStandard = CppStandardVersion.Latest

In the yourproject.build.cs not target.cs

1 Like