# Make template take int32 instead of int

**URL:** <https://forums.unrealengine.com/t/make-template-take-int32-instead-of-int/838522>\
**Category:** Programming & Scripting\
**Tags:** integer, unreal-engine, template\
**Created:** [April 2, 2023, 9:05am UTC](https://forums.unrealengine.com/t/make-template-take-int32-instead-of-int/838522 "2023-04-02T09:05:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![randomAcd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@randomAcd](https://forums.unrealengine.com/u/randomAcd)\
**Post date:** [April 2, 2023, 9:05am UTC](https://forums.unrealengine.com/t/make-template-take-int32-instead-of-int/838522/1 "2023-04-02T09:05:52Z")

</div>

Hello,

I tried writing a template function and the compiler tries to input an int instead of an int32 with a 0.  
Now there are some template functions (like the TArray constructor) that know they should take an int32 instead of an int.  
I wonder how the compiler knows that without a specialization.

Example:

```auto
// My Function
template<typename T, std::enable_if_t<std::is_arithmetic_v<T>, bool> = true>
void MyFunc(T Arg);

// TArray Constructor
TArray(std::initializer_list<InElementType> InitList)

```
