# UE5.7为什么新建的C++项目添加的C++类会出现模板参数错误？

**URL:** <https://forums.unrealengine.com/t/ue5-7-c-c/2683286>\
**Category:** 简体中文 (Simplified Chinese)\
**Tags:** unreal-engine, CPP, question\
**Created:** [December 9, 2025, 1:43am UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286 "2025-12-09T01:43:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![xmdzsdjc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xmdzsdjc](https://forums.unrealengine.com/u/xmdzsdjc)\
**Post date:** [December 9, 2025, 1:43am UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/1 "2025-12-09T01:43:38Z")

</div>

就像这样，我删除了缓存，更新了VS和UE5.7.1都还是这样，重新创建项目也一样

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/9/22937f1c629e55bafaefad04551924ca861bf009.png)

模板参数 “T” 未在 类模板 “UEStaticAssertCompleteType\_Private::TUEStaticAssertTypeCheckerBase\<\<错误类型\>\>” 的模板参数列表中使用或无法从中推导  
模板参数 “T” 未在 类模板 “TIsContiguousContainer\<\<错误类型\>\>” 的模板参数列表中使用或无法从中推导  
数组的大小必须大于零  
数组的大小必须大于零  
数组的大小必须大于零  
数组的大小必须大于零  
数组的大小必须大于零

---

<div class="post-metadata">

**Author:** ![Arodi007](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arodi007/32/1022275_2.png) [@Arodi007](https://forums.unrealengine.com/u/Arodi007)\
**Post date:** [December 9, 2025, 12:28pm UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/2 "2025-12-09T12:28:01Z")

</div>

Make sure you installed all those checkboxes first:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/9/8799278fa9b69265a0349c27a2e636f1757478e5.png)

And that your windows sdk matches with your windows exact version.

More detail on: [Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.7 Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine?application_version=5.7)

---

<div class="post-metadata">

**Author:** ![xmdzsdjc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xmdzsdjc](https://forums.unrealengine.com/u/xmdzsdjc)\
**Post date:** [December 9, 2025, 4:26pm UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/3 "2025-12-09T16:26:23Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/d/2adfa6ec4c6488cd3d1aafa504baa2e67cda82e8.png)  
**I’ve installed all the components, but I’m still getting IntelliSense errors in VS. I really don’t know what to do anymore.  
But thanks for your reply and help**

---

<div class="post-metadata">

**Author:** ![gardian206](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gardian206](https://forums.unrealengine.com/u/gardian206)\
**Post date:** [December 9, 2025, 8:29pm UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/4 "2025-12-09T20:29:54Z")

</div>

I am unsure on the clustering of ?Korean? plus how Camal case can cause special clustering in English, so I can’t really read your original post.

after setting up Visual Studio, make sure to go to your .uproject→Right click→ (more options on windows 11) → “Generate Visual Studio files”

then inside the Visual Studio project, go to Tools→Options, there should be a section for Unreal Engine on the left hand menu (if there isn’t then a component is not selected properly at the installation step)

- it might also be from an extension (I think Visual Studio should pull it automatically at some point) Extensions → “Manage Extensions” and search for “Unreal Engine”

in “Code Analysis”: make sure both bools are set to true, and in “Macro IntelliSense” that “Macro IntelliSense Support” is also set to True.

- “Unreal Build Tool options” → ”Include all modules in targets” is also true

for the “Blueprints” section I find both of these produce too much spam, and can produce extra lines, and characters into headers, that just makes them harder to read.

then close Visual Studio, and re-open the .sln file

you might still get a message about “intelliSense could not generate around macros” for the most part that is Visual Studio being… not great, but it goes away after a few restarts, and the Header Tool and Build Tool (for me they generate purple underlines) that will cause a breaking build.

---

<div class="post-metadata">

**Author:** ![Arodi007](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arodi007/32/1022275_2.png) [@Arodi007](https://forums.unrealengine.com/u/Arodi007)\
**Post date:** [December 10, 2025, 4:09pm UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/5 "2025-12-10T16:09:10Z")

</div>

If nothing works out, try to use Rider: [Before you start | JetBrains&nbsp;Rider Documentation](https://www.jetbrains.com/help/rider/Unreal_Engine__Before_You_Start.html)

You can open .uproject directly and there no need to generate visual studio files.

---

<div class="post-metadata">

**Author:** ![JonchelleZx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonchelleZx](https://forums.unrealengine.com/u/JonchelleZx)\
**Post date:** [April 18, 2026, 1:11pm UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/6 "2026-04-18T13:11:42Z")

</div>

同样的问题，尝试把实时关掉后解决

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/c/7ecd00bf5c8c949cc61a64c161e75e3fef40b29a.png)

---

<div class="post-metadata">

**Author:** ![FreeTDR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FreeTDR](https://forums.unrealengine.com/u/FreeTDR)\
**Post date:** [June 6, 2026, 2:55pm UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/7 "2026-06-06T14:55:34Z")

</div>

没删干净!? 🙃

---

<div class="post-metadata">

**Author:** ![RandomSeason1010](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RandomSeason1010](https://forums.unrealengine.com/u/RandomSeason1010)\
**Post date:** [September 20, 2026, 1:22pm UTC](https://forums.unrealengine.com/t/ue5-7-c-c/2683286/8 "2026-09-20T13:22:28Z")

</div>

我也碰到这种问题，后来安装了UMP工具集就解决了

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/f/54fa6673c995daec7b6d30232a1673e09385ae22.png)
