Re: Multidimensional foreach

2009-12-18 Thread Simen kjaeraas
On Fri, 18 Dec 2009 19:49:31 +0100, Bill Baxter wrote: On Fri, Dec 18, 2009 at 5:17 AM, Simen kjaeraas wrote: Simen kjaeraas wrote: I have a function that returns an N-dimensional array, where N is a template parameter. Now I want to run a foreach loop through each element of this array.

Re: Multidimensional foreach

2009-12-18 Thread Bill Baxter
On Fri, Dec 18, 2009 at 5:17 AM, Simen kjaeraas wrote: > Simen kjaeraas wrote: > >> I have a function that returns an N-dimensional array, where N is a >> template parameter. Now I want to run a foreach loop through each >> element of this array. Is there a known and tested way to do this, >> or

Re: Multidimensional foreach

2009-12-18 Thread Simen kjaeraas
Simen kjaeraas wrote: I have a function that returns an N-dimensional array, where N is a template parameter. Now I want to run a foreach loop through each element of this array. Is there a known and tested way to do this, or should I write my own templates to do it? I wrote this implementati

Multidimensional foreach

2009-12-17 Thread Simen kjaeraas
I have a function that returns an N-dimensional array, where N is a template parameter. Now I want to run a foreach loop through each element of this array. Is there a known and tested way to do this, or should I write my own templates to do it? -- Simen