Bug 20176 – std.container.rbtree does not work at compile time
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-08-28T05:38:24Z
Last change time
2020-11-09T15:14:29Z
Assigned to
No Owner
Creator
Walter Bright
Comments
Comment #0 by bugzilla — 2019-08-28T05:38:24Z
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".
Comment #1 by n8sh.secondary — 2020-11-09T15:14:29Z
This was fixed at some point between the time this report was filed and v2.091.0.