Re: question with compile-time reflection

2013-03-10 Thread Rob T
template NDimensionalArrayType(T,alias size) I'm wondering what alias size does? I can't find that form documented anywhere, but it seems to be valid. Thanks. --rt

Re: question with compile-time reflection

2013-03-10 Thread Zhenya
And since alias can represent any symbol,i think that it's correct usage.

Re: question with compile-time reflection

2013-03-10 Thread Zhenya
On Monday, 11 March 2013 at 00:10:46 UTC, Rob T wrote: template NDimensionalArrayType(T,alias size) I'm wondering what alias size does? I can't find that form documented anywhere, but it seems to be valid. Thanks. --rt It's just a little hack for known bug - only string and integer value

Re: question with compile-time reflection

2013-03-10 Thread anonymous
On Monday, 11 March 2013 at 00:10:46 UTC, Rob T wrote: template NDimensionalArrayType(T,alias size) I'm wondering what alias size does? I can't find that form documented anywhere, but it seems to be valid. http://dlang.org/template.html#TemplateAliasParameter

Re: question with compile-time reflection

2013-03-10 Thread Rob T
On Monday, 11 March 2013 at 00:26:25 UTC, anonymous wrote: On Monday, 11 March 2013 at 00:10:46 UTC, Rob T wrote: template NDimensionalArrayType(T,alias size) I'm wondering what alias size does? I can't find that form documented anywhere, but it seems to be valid.

question with compile-time reflection

2013-03-09 Thread Zhenya
Hi! this code fails with message:NDimensionalArray.doIndex(Array) if (is(Array _ : NDimensionalArrayType!(T,s),const(int[]) s)) cannot deduce template function from argument types !()(int[2u][2u],const(int[])) Tell me please,am I wrong? And if yes,what should I change to make it work?

Re: question with compile-time reflection

2013-03-09 Thread Rob T
template NDimensionalArrayType(T,alias size) I think your use of alias size is incorrect. See http://dlang.org/declaration.html --rt

Re: question with compile-time reflection

2013-03-09 Thread Ivan Kazmenko
this code fails with message:NDimensionalArray.doIndex(Array) if (is(Array _ : NDimensionalArrayType!(T,s),const(int[]) s)) cannot deduce template function from argument types !()(int[2u][2u],const(int[])) Tell me please,am I wrong? And if yes,what should I change to make it work? I'm no D

Re: question with compile-time reflection

2013-03-09 Thread Zhenya
On Saturday, 9 March 2013 at 23:05:56 UTC, Ivan Kazmenko wrote: this code fails with message:NDimensionalArray.doIndex(Array) if (is(Array _ : NDimensionalArrayType!(T,s),const(int[]) s)) cannot deduce template function from argument types !()(int[2u][2u],const(int[])) Tell me please,am I

Re: question with compile-time reflection

2013-03-09 Thread Zhenya
Although of course I would want to know what's wrong with constrait,because it protect doArray against incorrect using. I don't worry about effiency very much,I just wanted to right n-dimensional tree of intervals.And for doing it I needed n-dimensional array with opIndex like it.

Re: question with compile-time reflection

2013-03-09 Thread Zhenya
On Saturday, 9 March 2013 at 23:40:25 UTC, Zhenya wrote: Although of course I would want to know what's wrong with constrait,because it protect doArray against incorrect using. I don't worry about effiency very much,I just wanted to right n-dimensional tree of intervals.And for doing it I