# Is it possible to add a function with template in UE4?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-add-a-function-with-template-in-ue4/57694>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [March 9, 2016, 3:41am UTC](https://forums.unrealengine.com/t/is-it-possible-to-add-a-function-with-template-in-ue4/57694 "2016-03-09T03:41:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [March 14, 2016, 4:42am UTC](https://forums.unrealengine.com/t/is-it-possible-to-add-a-function-with-template-in-ue4/57694/2 "2016-03-14T04:42:57Z")

</div>

Your template functions need to be posted in your .h file only, if you want them to work easily

I have a wiki on template functions here:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Here’s a template function that I submitted to the engine which Epic accepted in 4.3:

> **[Two new Math functions for you from me in 4.3, Template Min/Max of Array](https://forums.unrealengine.com/showthread.php?20212-Two-new-Math-functions-for-you-from-me-in-4-3-Template-Min-Max-of-Array&p=98583&viewfull=1#post98583)**
>
> Dear Community, In 4.3 you now have available two C++ functions from me, which I gave to Epic! These are template functions for the min and max of an array of any datatype for which the \< operator is defined! You can use my Min/Max of Array...

🙂

Rama

---

_[View the full topic](https://forums.unrealengine.com/t/is-it-possible-to-add-a-function-with-template-in-ue4/57694)._
