ctfe and static arrays

2015-05-24 Thread Jay Norwood via Digitalmars-d-learn
I'm a bit confused by the documentation of the ctfe limitations wrt static arrays due to these seemingly conflicting statements, and the examples didn't seem to clear anything up. I was wondering if anyone has examples of clever things that might be done with static arrays and pointers using

Re: ctfe and static arrays

2015-05-24 Thread anonymous via Digitalmars-d-learn
On Sunday, 24 May 2015 at 17:35:39 UTC, Jay Norwood wrote: I'm a bit confused by the documentation of the ctfe limitations wrt static arrays due to these seemingly conflicting statements, and the examples didn't seem to clear anything up. I was wondering if anyone has examples of clever

Re: ctfe and static arrays

2015-05-24 Thread anonymous via Digitalmars-d-learn
On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote: Static array has a special meaning. It does not mean static variable with an array type. Static arrays are those of the form Type[size]. That is, the size is known statically. PS: You may also see the term fixed-size array which means

Re: ctfe and static arrays

2015-05-24 Thread anonymous via Digitalmars-d-learn
On Sunday, 24 May 2015 at 20:53:03 UTC, Jay Norwood wrote: On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote: [...] 1) static int[5] x; -- x is a static variable with a static array type 2) static int[] x; -- static variable, dynamic array 3) int[5] x; -- non-static variable, static

Re: ctfe and static arrays

2015-05-24 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote: Static array has a special meaning. It does not mean static variable with an array type. Static arrays are those of the form Type[size]. That is, the size is known statically. Examples: 1) static int[5] x; -- x is a static variable