Arlo Belshee on 6 Jul 2003 15:29:01 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ALACPP] new books


>>> _C++ Templates: The Complete Guide_ by David Vandevoorde and Nicolai
>>> Josuttis
>>>
>>> 	How templates work, in detail.
>>
>> My thinking is that Modern C++ Design pretty much requires you grok
>> templates pretty well already.
>>
>
> Hmm... I think that depends on how you read Modern C++ Design.
> Honestly, it's usually close enough to the meeting time, and I'm
> usually getting tired enough of reading, that the final sections of  each
> chapter which deal with the peculiarities of templates get glossed  over.  I
> suppose if I actually had occasion to use this stuff, then the  details of
> syntax would be more important to me.

A quick note on this one: it covers a lot of stuff that MC++D doesn't. In
particular, there are several sections about the specific rules for template
function overloads, etc, which are nowhere covered in MC++D. There's also a
chapter on "what things we're likely to add to templates in the next
standardization, and why".

Given that you'vre read MC++D, I wouldn't recommend reading Templates in
depth, but I would recommend skimming it and closely reading the following
chapters:

Ch 5: Tricky Basics
Ch 6: Using Templates in Practice
Ch 7.4: The One-Definition Rule
Ch 8: Fundamentals in Depth
Ch 9: Names in Templates
Ch 10.3: The C++ Instantiation Model
Ch 11.7: The Barton-Nackman Trick
Ch 12.2: Overloading Function Templates
Ch 13: Future Directions
Ch 16.3: The CRTP
Ch 16.4: Parameterized Virtuality
Ch 18: Expression Templates
Both Appendices.

Also, if you don't already know templates well enough to figure out how
boost's function & bind libraries work, then Ch 22: Function Objects and
Callbacks is a good start point. It develops a slightly simpler version of the
library, from which it is easy to step up to the full boost implementation.

Overall, about half of the book is worth at least a serious skimming, and you
will want to slow down and really read several sections. _Templates_ goes into
a lot more detail about how the dang things are really implemented and
defined, and what they really are, then MC++D does.

Arlo


_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp