# TUnion declaration incomplete

**URL:** <https://forums.unrealengine.com/t/tunion-declaration-incomplete/307937>\
**Category:** C++\
**Tags:** unreal-engine, bug-report, CPP, question\
**Created:** [February 24, 2015, 4:15pm UTC](https://forums.unrealengine.com/t/tunion-declaration-incomplete/307937 "2015-02-24T16:15:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zamy](https://forums.unrealengine.com/u/zamy)\
**Post date:** [February 24, 2015, 4:15pm UTC](https://forums.unrealengine.com/t/tunion-declaration-incomplete/307937/1 "2015-02-24T16:15:53Z")

</div>

Hello guys, as suggested by Moss, i’m opening a new question to put it cleaner.

It turns out that in TUnion is declared a log category (Union.h):

```
DECLARE_LOG_CATEGORY_EXTERN(LogUnion, Log, All);

```

that is misssing the relative implementation (Union.cpp is actually commented out).  
To actually use a TUnion in most of the cases you need to add

```
DEFINE_LOG_CATEGORY(LogUnion);

```

in your custom .cpp class’s file.

For a complete case explanation, you can look here:

[TUnion and TArray](https://answers.unrealengine.com/questions/176124/tunion-and-tarray.html?sort=newest)

I hope you’ll open a ticket about it.

Sincerely, zamy

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [February 24, 2015, 8:02pm UTC](https://forums.unrealengine.com/t/tunion-declaration-incomplete/307937/2 "2015-02-24T20:02:24Z")

</div>

Hey

Thanks for letting us know about this issue. I have submitted a report about the implementation being commented out in Union.cpp (UE-10703) for further investigation. Best of luck on your projects.

Cheers
