[Issue 18071] [REG2.078] byKey, byValue and byKeyValue are now a hole for unsafe code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 13 13:56:00 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18071

Jack Stouffer <jack at jackstouffer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jack at jackstouffer.com

--- Comment #1 from Jack Stouffer <jack at jackstouffer.com> ---
The first example can be fixed by having `byValue.front` and `byValue.popFront`
do this at the beginning of the function:

    if (this.empty)
        assert(0, "accessing front on an empty byValue");

--


More information about the Digitalmars-d-bugs mailing list