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

2019-03-08 02:06发布

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

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

8条回答
Explosion°爆炸
2楼-- · 2019-03-08 02:40

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

查看更多
\"骚年 ilove
3楼-- · 2019-03-08 02:42

"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.

查看更多
神经病院院长
4楼-- · 2019-03-08 02:43

Effective STL by Scott Meyers

查看更多
叼着烟拽天下
5楼-- · 2019-03-08 02:50

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

             

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.

查看更多
倾城 Initia
6楼-- · 2019-03-08 02:50

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.

查看更多
男人必须洒脱
7楼-- · 2019-03-08 02:52

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.

查看更多
登录 后发表回答