Grzeogorz Łuszczek:

I will be glad if someone could help me with my problem.

Such questions are better asked in D.learn newsgroup.

Every time you instantiate the sort function with different template arguments, you generate a different type. So you could use a variant, or probably better to find a different solution. You could store just the arguments of the sort template, like the string "a.ipAddress < b.ipAddress" or the equivalent lambda, and later use it as arguments to instantiate the sort when you need it.

Bye,
bearophile

Reply via email to