Suggestion for template book for C++? [closed]

人走茶凉 提交于 2019-12-20 08:19:11

问题


I am learning templates. Which book is worth buying for doing template programming?

I already have The C++ Programming Language and Effective C++.


回答1:


Those two books are pretty good in my opinion and they helped me a lot

  • C++ Templates: The Complete Guide by David Vandevoorde and Nicolai M. Josuttis
  • Modern C++ Design by Andrei Alexandrescu
     

The first one explains how templates work. The second book is more about how to use them. I recommend you to read the first book before starting with Modern C++ Design because that's heavy stuff.




回答2:


Maybe a bit mind-boggling if you are just learning, but after the books you mention, you may want to read Andrei Alexandrescu's Modern C++ Design, if only to learn what can be accomplished through templates. Besides, it discusses many advanced aspects of templates wonderfully.




回答3:


Search for fairly recent book "Advanced C++ Metaprogramming" by Davide Di Gennaro




回答4:


Both Modern C++ design and C++ Template Metaprogramming are very good (and quite advanced) books on the subject. I have a strong personal preference for the first.




回答5:


C++ Templates: The Complete Guide is your best bet. You could also learn about the Standard Library which heavily uses templates.




回答6:


There is a hidden treasure in C++ templates that very few people are aware of: C++ Common Knowledge: Essential Intermediate Programming.

The last 15 chapters of that book both teaches better and complements C++ Template Metaprogramming in some respects. I strongly recommend anyone who is to learn templates to read this book foremost.




回答7:


"C++ Templates: The Complete Guide (Vandevoorde & Josuttis)" is excellent for the theory. Then you can learn even more about actual templating practice by looking at how templates are used in the Boost library.




回答8:


Effective STL by Scott Meyers



来源:https://stackoverflow.com/questions/514981/suggestion-for-template-book-for-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!