# unresolved external symbol TSizedAllocatorBase\<\>::ForAnyElementType::ForAnyElementType(class ... const &) 

**URL:** <https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [May 15, 2026, 3:34pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050 "2026-05-15T15:34:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 15, 2026, 3:34pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050/1 "2026-05-15T15:34:01Z")

</div>

The problem is simple. In a recent commit for TArray, a copy constructor got added in the new `ForAnyElementType` type, and this copy constructor is not defined. Meaning anything using it will break.

The problem is the emission of TArray\<T\>::PadToNum and other items that will force usage of the new undefined copy constructor.

The fix is : Do not have a pattern where you do a class MYMODULE\_API FMyClass : public TArray\<Something\>, or else, it will force the definition of TArray\<T\>::PadToNum and other elements requiring the copy constructor, and it will add a linking error.

I am providing this here mostly for visibility, as it’s REALLY HARD to figure out that issue with nondescript linking errors pointing to the same, with no guidance from “used in …” (thanks, Visual Studio Linker).

If you ever need to figure it out in a huge module, a trick is to use the dreaded `bPreprocessOnly = true;` in your Target, compile one of your linked error file (ONLY ONE FILE!), remove the target flag (because lord forbid you compile an entire project with this), and then use the generated intermediate .i file to search for TArray, and figure out what you might be doing wrong in your code. Good luck, you’ll need it!

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 15, 2026, 3:34pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050/2 "2026-05-15T15:34:05Z")

</div>

**Steps to Reproduce**  
Create an exported class that’s derived from a TArray.

You will get linking errors such as this one:

```auto
unresolved external symbol "protected: __cdecl TSizedAllocatorBase<32,class TSizedHeapAllocator<32,struct FMemory>>::ForAnyElementType::ForAnyElementType(class ... const &)"

```

---

<div class="post-metadata">

**Author:** ![Steve\_Robb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steve\_Robb](https://forums.unrealengine.com/u/Steve_Robb)\
**Post date:** [May 18, 2026, 4:17pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050/3 "2026-05-18T16:17:47Z")

</div>

Hi, I tried what you suggested and didn’t get any linkage error. I’m pretty sure that no function - and particularly **PadToNum** - should be attempting to call those copy constructors and assignment operators.

That said, they are a remnant from pre-C++11 and are better written these days as public and as **TSizedAllocatorBase(const TSizedAllocatorBase&) = delete;**. Can you try that and let me know if it works for you? This should stop the compiler attempting to link to those functions entirely. I will make the equivalent change here, because that’s the preferable and more modern approach anyway.

Steve

---

<div class="post-metadata">

**Author:** ![Steve\_Robb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steve\_Robb](https://forums.unrealengine.com/u/Steve_Robb)\
**Post date:** [May 19, 2026, 12:53pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050/4 "2026-05-19T12:53:29Z")

</div>

The deletion of those copy functions in allocators was submitted and is visible here:

[https://github.com/EpicGames/UnrealEngine/commit/e3bd4b59e7c97ff26f2d7ba58053b09498be15e4](https://github.com/EpicGames/UnrealEngine/commit/e3bd4b59e7c97ff26f2d7ba58053b09498be15e4)

Steve

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 29, 2026, 1:30pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050/5 "2026-05-29T13:30:17Z")

</div>

It worked! 🙂 Thank you!

---

<div class="post-metadata">

**Author:** ![Steve\_Robb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steve\_Robb](https://forums.unrealengine.com/u/Steve_Robb)\
**Post date:** [May 29, 2026, 2:02pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-tsizedallocatorbase-foranyelementtype-class-const/2732050/6 "2026-05-29T14:02:04Z")

</div>

Great, thanks for the confirmation!

Steve
