How to use templates with Unreal

The following code is an example how to use C++ templates with Unreal, a manager is used in order to get any specified type of light...