Does UE5 use c++17 by default or bug?

If you go to your project’s MyProjectName.cpp it will have a macro like this:
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Test2p7, "Test2p7" );

With 4.27, this macro will change if you use c++14 Intellisense vs c++17.

With 5.0.1 it doesn’t change and only uses c++17. c++14 Intellisense will show error.

This is a non full source VSCode 5.0.1 project with no special c++17 flags set.

Is 5.0 c++17 by default now or is this a bug?

1 Like

Just so people know UE5 is 100% c++17 now.

I tested this c++17 code with UE4 4.27 and UE5 5.0.1

auto identity = [](int n) constexpr { return n; };
static_assert(identity(123) == 123);

It errors with 4.27 but Builds without error with 5.0.1

I also tried some c++20 code and it failed to Build with either one.

3 Likes