Error on recursive alias

Ali Çehreli acehreli at yahoo.com
Sun Aug 25 10:28:16 PDT 2013


On 08/25/2013 09:23 AM, Johan Mollevik wrote:

 > Hmm, your solution does not work with static arrays it seems, will se
 > if I can sort that out

Probably due to the fact that static arrays cannot be InputRanges 
because they cannot lose elements by popFront(). A slice to the entire 
array is an InputRange though:

     foreach (e; myStaticArray)      // compilation error

     foreach (e; myStaticArray[])    // works

Ali



More information about the Digitalmars-d-learn mailing list