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

**URL:** <https://forums.unrealengine.com/t/does-ue5-use-c-17-by-default-or-bug/553025>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, CPP, question\
**Created:** [May 9, 2022, 6:48pm UTC](https://forums.unrealengine.com/t/does-ue5-use-c-17-by-default-or-bug/553025 "2022-05-09T18:48:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![boocs\_ved](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@boocs\_ved](https://forums.unrealengine.com/u/boocs_ved)\
**Post date:** [May 9, 2022, 6:48pm UTC](https://forums.unrealengine.com/t/does-ue5-use-c-17-by-default-or-bug/553025/1 "2022-05-09T18:48:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![boocs\_ved](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@boocs\_ved](https://forums.unrealengine.com/u/boocs_ved)\
**Post date:** [May 11, 2022, 3:52am UTC](https://forums.unrealengine.com/t/does-ue5-use-c-17-by-default-or-bug/553025/2 "2022-05-11T03:52:31Z")

</div>

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.
