Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

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

like image 686
yesraaj Avatar asked Feb 05 '09 08:02

yesraaj


6 Answers

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.

like image 159
Konrd Avatar answered Oct 11 '22 12:10

Konrd


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.

like image 28
Gorpik Avatar answered Oct 11 '22 13:10

Gorpik


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

like image 35
mloskot Avatar answered Oct 11 '22 13:10

mloskot


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.

like image 30
Paolo Tedesco Avatar answered Oct 11 '22 12:10

Paolo Tedesco


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

like image 43
Firas Assaad Avatar answered Oct 11 '22 12:10

Firas Assaad


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.

like image 45
Özgür Avatar answered Oct 11 '22 12:10

Özgür