Skip to content

Do Julia accept template<int n> like CPP? #15445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zhujinxuan opened this issue Mar 10, 2016 · 2 comments
Closed

Do Julia accept template<int n> like CPP? #15445

zhujinxuan opened this issue Mar 10, 2016 · 2 comments

Comments

@zhujinxuan
Copy link

Recently I am writing a self-use package for calculating space differiente. The package accept 1-st order differiente and 2-nd order differiente but throw error when calculating higher oders.

I was thinking about something like types like eval(SpaceDiff{1}, arg...) and eval(SpaceDiff{2}...) rather than juist 1/2, as it can throw an error in a separated defination.

But I did not see anything similar in the document. Is there a similar way to specify types or methods by an actual int?

Thank you.

@johnmyleswhite
Copy link
Member

This question should probably be submitted to julia-users. We don't answer usage questions on GitHub to keep the level of e-mail manageable.

@yuyichao
Copy link
Contributor

Dup of #9580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants