On Tuesday, 23 April 2013 at 03:46:30 UTC, Mehrdad wrote:
...Nope, still broken.
The behavior isn't too surprising to me. Your code is buggy. Defining opEquals gets you the behavior you might want:
import std.stdio, std.algorithm; struct S { string a; bool opEquals(S rhs) { return a.equal(rhs.a); } } pragma(msg, S("x") == S("x".idup)); void main() { writeln(S("x") == S("x".idup)); } outputs: true true