Steven Schveighoffer wrote:

Again, the issue here is D has restrictions on ref parameters. There are no such restrictions on pass-by-value parameters. So by default, the predicate tries by-value.

I am starting to understand the difficulty with ref being too restrictive. Some kind of "const ref" in the language would have helped indeed. But it would probably cause some allocation difficulties for actual constants... or worse?

In this case, RedBlackTree is always assured of having lvalues for the predicate, so I can probably make the default use pass-by-ref. If you could file a bug, that would be most helpful.

Done! http://d.puremagic.com/issues/show_bug.cgi?id=9513

Reply via email to