www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DList -- removing an element

--0015174c3390e785bb04d20f5ff4
Content-Type: text/plain; charset=ISO-8859-1

Greetings

I have created a DList of class objects. Now I want to delete a particular
object from the list. I do not see a straightforward way of doing that. The
only way I found was to create a DList range, take out all other elements
from the range using popFront and popBack and then apply remove(Range).

Am I missing something?

Regards
- Puneet

--0015174c3390e785bb04d20f5ff4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Greetings<div><br></div><div>I have created a DList of class objects. Now I=
 want to delete a particular object from the list. I do not see a straightf=
orward way of doing that. The only way I found was to create a DList range,=
 take out all other elements from the range using popFront and popBack and =
then apply remove(Range).</div>

<div><br></div><div>Am I missing something?</div><div><br></div><div>Regard=
s</div><div>- Puneet</div>

--0015174c3390e785bb04d20f5ff4--
Dec 30 2012