On Wednesday, 11 April 2018 at 21:29:27 UTC, Alex wrote:
I would say, alias template parameter is your friend.

class SortedList(T, alias comparer)

It works, thank you!
But just to be shure, there's no way to have this more strongly typed in D so I can enforce that `comparer`is a funciton or delegate with a specific defenition? Right now i'm relying on the template to error on some different place which might not give such a readable error message to the user.

Reply via email to