import std.container : RedBlackTree;

int main()
{

    struct Location {
        int x;
        int y;
    }

    struct Node{
        this(Location loc, uint f) {
            this.loc = loc;
            this.f = f;
        }
        Location loc;
        uint f;
    }

auto priorityQueue = new RedBlackTree!(Node, "a.f < b.f", true); // true: allowDuplicates

// C:\D\dmd2\windows\bin64\..\..\src\phobos\std\container\rbtree.d(806): Error: `main` is
// a nested function and cannot be accessed from
// `std.container.rbtree.RedBlackTree!(Node, "a.f < b.f", true).RedBlackTree.allocate`

return 0;
}

Reply via email to