How to override opCmp when two different sorts are needed?
BCS
ao at pathlink.com
Tue Aug 14 14:59:16 PDT 2007
Reply to Frits,
> BCS wrote:
>
>> // overlay array with new struct array and sort that
>> (cast(FooWrap*)f.ptr)[0..f.length].sort
>>
> That probably looks better as "(cast(FooWrap[]) f).sort", which should
> be equivalent.
>
yes but you might be able to slip that past in a code review (if coffee is
in short supply). My version will get you tied to a post and shot (as you
is proper) even if everyone else in the room is asleep!
More information about the Digitalmars-d
mailing list