[Issue 20176] New: std.container.rbtree does not work at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 28 05:38:24 UTC 2019


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

          Issue ID: 20176
           Summary: std.container.rbtree does not work at compile time
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

The following code:

    import std.format, std.stdio;

    class X {
        mixin(members());
    }

    string members() {
        import std.container.rbtree;
        auto rbt = redBlackTree(3, 1, 4, 2, 5);
        int x = rbt.front;
        return format("int y = %s;\n", x);
    }

fails to work at compile time with the message "cannot cast ... to ... at
compile time".

--


More information about the Digitalmars-d-bugs mailing list