C symbols for function templates

11 views
Skip to first unread message

Shea Levy

unread,
Feb 7, 2015, 12:52:47 PM2/7/15
to ats-lan...@googlegroups.com
Hello,

Is there any way to predict what the C symbol will be for a given instantiation of a function template? Can I specify it for specific instantiation?

~Shea

Hongwei Xi

unread,
Feb 7, 2015, 1:22:28 PM2/7/15
to ats-lan...@googlegroups.com
You can do something like this:

fun{a:t@ype} foo (x: a)

extern fun foo_int (x: int) = "ext#foo_int"

implement foo_int (x) = foo<int> (x: int)

Extvar may be another option:


~Shea

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/0E5187F5-8410-4FD0-B17B-F97107E51BE9%40shealevy.com.

Reply all
Reply to author
Forward
0 new messages