Code example for function/delegate as template argument ?

chmike via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 3 23:21:36 PDT 2016


Hello,

I failed to find some code example for a template class/struct 
that accept a function/delegate as template argument. All 
examples I could find use simple value types like int or double.


I piggy bag another question. Defining a function/delegate as 
function argument is shown in examples. What I could not find is 
how would I pass an object instance with a method to call ? In 
C++ we use std::bind. How do we do that in D ?


More information about the Digitalmars-d-learn mailing list