[Effective-cpp] Item 35: Familiarize yourself with the language standard

Kevlin Henney kevlin at curbralan.com
Fri Jun 13 05:03:09 EDT 2003


In message <039e01c32f4c$63e5f260$8d6c6f50 at pc>, Terje Slettebø
<tslettebo at chello.no> writes
>>From: "Gregory Haley" <ghaley at venaca.com>
>
>> To quote from an external source, Musser,
>> Derge, and Saini, "STL Tutorial and Reference Guide", the "STL consists of
>> six major components:  containers, generic algorithms, iterators, function
>> objects, adaptors, and allocators."

There are five major groupings rather than six: containers, algorithms,
iterators, function objects and allocators. Adaptors are not really a
component category: they are a subclassification of all of them, ie
there are adapted containers, iterators and functions objects. In other
words, the notion of an adaptor is not a classification by the same
criteria of type as the other categories.

We can further argue that there are only four practical categories,
because allocators offer no useful support of the main goal of generic
programming.

>What also may be worth mentioning is what is not listed above, and what is
>not directly represented in the code: Generic concepts. This is arguably one
>of the most important contributions of the STL.

Or, another way of looking at it, and the one that I prefer, is that the
four core groupings are manifested in two forms: actual class templates
and the specification of families of which they are members.

Kevlin
____________________________________________________________

  Kevlin Henney                   phone:  +44 117 942 2990
  mailto:kevlin at curbralan.com     mobile: +44 7801 073 508
  http://www.curbralan.com        fax:    +44 870 052 2289
  Curbralan: Consultancy + Training + Development + Review
____________________________________________________________



More information about the Effective-cpp mailing list