How to define and use a custom comparison function
Jakob Ovrum via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 16 21:34:07 PDT 2014
On Tuesday, 17 June 2014 at 04:32:20 UTC, Jakob Ovrum wrote:
> On Monday, 16 June 2014 at 20:49:29 UTC, monarch_dodra wrote:
>> MyCompare cmp(SortOrder.ASC, 10);
>
> This syntax is not valid D.
>
> It should be:
>
> auto cmp = MyCompare(SortOrder,ASC, 10);
Sorry, that first comma is a typo and should be a dot.
auto cmp = MyCompare(SortOrder.ASC, 10);
More information about the Digitalmars-d-learn
mailing list