xxxxxxxxxx
struct S {
S[] childs;
int opCmp(const ref S rhs) const {
if (childs.length != rhs.childs.length) {
return cast(int) (childs.length - rhs.childs.length);
}
foreach (const ref c; childs) {
// ...
}
return 0;
}
}
import std.container.rbtree;
alias SSet = RedBlackTree!S;
void main() {
import std.stdio;
writeln("ok");
}