I have been reading templates,functors,callback function for the past week and have referred some good books and articles.
I however feel that, unless I can get good practice – programming in templates and use functors-callbacks there is no way I can really understand all the concepts or fluently use them while coding.
Could anyone suggest some articles or books or websites where , there is a definition of the problem and also a solution to the same. I could just write code for the problem and check later on if my solution is good enough..
I am also aware that some of our stack-overflow members are experts in templates and callback functions. It would be great if they could design a problem and also post a solution , where a lot of template beginners like me could benefit.
A good exercise is to replace named functions with anonymous functors. For example, instead of using a predicate such as
, you can synthesize a functor via
std::not1(std::mem_fun_ref(&Account::is_balanced)).