Shouldn't SList in std.container hold an owner pointer to verify a range belongs to the list?

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Dec 17 06:57:21 PST 2013


On 12/17/13, monarch_dodra <monarchdodra at gmail.com> wrote:
> Didn't I reply to this already?

dlang.org was down recently, maybe the forum was as well. :)

> Anyways... what I said is that we can add the test in
> non-release, but I see it as assertive code, so it can be removed
> in release.

Sure: version(assert) SList owner;

Works for me.

> I'd be more afraid of DList's current semantics: Neither value
> nor ref. I've been trying to fix it for more than a year now:
>
> https://github.com/D-Programming-Language/phobos/pull/953

I'll take a look.


More information about the Digitalmars-d-learn mailing list