how to "think in templates", i.e. how to know that a problem can be solved using templates and how to adapt to it?

Posted by sap on Programmers See other posts from Programmers or by sap
Published on 2011-11-28T18:01:31Z Indexed on 2011/11/28 18:45 UTC
Read the original article Hit count: 251

Filed under:
|

I decided to improve my knowledge of template meta-programming, i know the syntax and rules and been playing with counteless examples from online resources.

i understand how powerfull templates can be and how much compile time optimization they can provide but i still cant "think in templates", that is, i cant seem to know by myself if a certain problem could best be solved with templates (instead of something else) and if it can, how to adapt that problem to templates.

so what im asking is, is there some kind of online resource or maybe book that teaches how to identify problems that could best be solved with templates and how to adapt that problem. basically i want to learn to "think in templates".

already asked on stackoverflow but once again people just redirected me to resources on how to use templates, when im really asking is how to know when to use template meta-programming and how to adapt that problem to templates.

thanks in advance.

© Programmers or respective owner

Related posts about c++

Related posts about templates