sort!("...") with template function?

Vladimirs Nordholm v at
Mon Feb 25 12:37:31 UTC 2019


I wish to sort an array by calling a template function on a 
struct. In essence I want to do

     foos.sort!("a.get!Dummy < b.get!Dummy");

but I get the error message

/dlang/dmd/linux/bin64/../../src/phobos/std/functional.d-mixin-215(215): Error: undefined identifier Dummy

Is there anyway I can get `sort` to recognise my Dummy type?


More information about the Digitalmars-d-learn mailing list