foreach over pointer to range

Peter Alexander peter.alexander.au at gmail.com
Tue Jun 5 12:25:43 PDT 2012


On Tuesday, 5 June 2012 at 18:46:51 UTC, Timon Gehr wrote:
> On 06/05/2012 08:42 PM, Artur Skawina wrote:
>> "foreach (e; pointer_to_range)" currently fails with:
>>
>>    Error: foreach: Range* is not an aggregate type
>>
>> It can be worked around with...

Why not: foreach(e; *pointer_to_range)

Seems like the obvious solution to me, and works.




More information about the Digitalmars-d mailing list