Skip to content
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

Consider free function to access dims instead of member functions #34

Open
dsharlet opened this issue Jul 26, 2020 · 0 comments
Open

Consider free function to access dims instead of member functions #34

dsharlet opened this issue Jul 26, 2020 · 0 comments

Comments

@dsharlet
Copy link
Owner

When accessing a dim of a shape, ideally we would allow simply auto x = s.dim<0>(). Unfortunately, the reality of template syntax issues in many situations means it has to be auto x = s.template dim<0>().

This is the main reason I added named aliases like auto x = s.x().

But, maybe a better direction to go is a free function dim<i>(s).

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

1 participant