Templated Functions Support

Started by
3 comments, last by WitchLord 2 years, 3 months ago

Hi,

In this post https://www.gamedev.net/forums/topic/702557-register-a-templated-function/ there is a mention on supporting templates functions in the roadmap. Is it still planned? Is there any ETA?

They are needed for interacting with generic high order functions (i.e. map)

Advertisement

jmgomez said:
i, In this post https://www.gamedev.net/forums/topic/702557-register-a-templated-function/ there is a mention on supporting templates functions in the roadmap. Is it still planned? Is there any ETA? They are needed for interacting with generic high order functions (i.e. m

Yes, they are still on the to-do list. No, there is no ETA for it to be implemented. A code contribution would definitely speed it up ?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

@WitchLord I use it in the context of UE so no super familiar with AS. But will download it when I have a chance and see if I can do something about it.
Do you recommend some place to look at in order to get your head around the problem? Cast<T> maybe?

Thanks!

Parsing is one good place to start. Yes, cast<T> can be a good place to look,

Another important thing is how the template functions should be represented in the application. I think they have to be restricted to use the generic calling convention, as it will allow the implementation to get the correct type for the arguments based on the defined template instance.

Whenever the compiler comes across the use of a template function, it must check generate a template instance with the correct type. For this you can take a look at how template instances are generated for template classes.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement