How to foreach over a DList?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Mar 31 11:23:05 PDT 2014


On Mon, Mar 31, 2014 at 05:50:16PM +0000, Jeroen Bollen wrote:
> I am trying to foreach over a std.container.DList but it isn't working. I
> have tried the following code:
[...]

Maybe try using opSlice:

	DList myList;
	foreach (e; myList[]) { ... }

?


T

-- 
Three out of two people have difficulties with fractions. -- Dirk Eddelbuettel


More information about the Digitalmars-d-learn mailing list