------- Comment #2 from [EMAIL PROTECTED]  2008-11-28 13:16 -------
(In reply to comment #1)
> Just a stab in the dark, but you might try making the argument to opCmp 'const
> MyStruct' or 'const MyStruct*'.  An opCmp shouldn't generally modify its
> argument so maybe DMD expects a 'const' in the signature.

Actually, if the above hypothesis is true, then probably 'this' should be
const, too:
  int opCmp(const MyStruct x) const { ... }
(if that's how you make this constant in D2 these days...}

There might be another problem, though, with the most recent D2, since 'this'
is now a reference.  As mentioned in bug 1861, using ref arguments in your
opCmp never worked with .sort, this might affect D2 now that this is a


Reply via email to