On Monday, 5 March 2018 at 12:41:06 UTC, Steven Schveighoffer wrote:
pragma(inline, true)
C lazyDeleted() pure nothrow @trusted { return cast(C)((cast(size_t*)null) + 1); }

I still can't evaluate at compile-though...

        enum holeKeyOffset = 0x1;

        pragma(inline, true)
        static K holeKey() @trusted pure nothrow @nogc
        {
            return cast(K)((cast(size_t*)null) + holeKeyOffset);
        }

        enum _ = holeKey;

fails as

Error: cannot perform pointer arithmetic on non-arrays at compile time

Reply via email to