September 11, 2022

Here's this code:

auto opSlice()
{
    struct Range
    {
        Attr currentAttr;

        auto front() { return currentAttr; }
        void popFront() { currentAttr = currentAttr._nextAttr; }
        bool empty() { return currentAttr is null; }
    }
    return Range(firstAttr);
}

This was originally in std.experimental.xml in domimpl.d, and it causes LDC to segfault, but compiles fine under DMD.

September 11, 2022
On Sunday, 11 September 2022 at 09:47:34 UTC, solidstate1991 wrote:
> Here's this code:

This should be allowed, but also the way you're supposed to write it now is a no-argument opIndex.