array icon indicating copy to clipboard operation
array copied to clipboard

Consider free function to access dims instead of member functions

Open dsharlet opened this issue 5 years ago • 0 comments

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).

dsharlet avatar Jul 26 '20 06:07 dsharlet