Home > Articles > Programming > C/C++

  • Print
  • + Share This
This chapter is from the book

3.10 Standard Library Facilities

The facilities provided by the standard library can be classified like this:

  1. Basic run-time language support (for example, for allocation and run-time type information)

  2. The C standard library (with very minor modifications to minimize violations of the type system)

  3. Strings and I/O streams (with support for international character sets and localization)

  4. A framework of containers (such as vector, list, and map) and algorithms using containers (such as general traversals, sorts, and merges)

  5. Support for numerical computation (complex numbers plus vectors with arithmetic operations, BLAS-like and generalized slices, and semantics designed to ease optimization)

The main criterion for including a class in the library was that it would somehow be used by almost every C++ programmer (both novices and experts), that it could be provided in a general form that did not add significant overhead compared to a simpler version of the same facility, and that simple uses should be easy to learn. Essentially, the C++ standard library provides the most common fundamental data structures together with the fundamental algorithms used on them.

Every algorithm works with every container without the use of conversions. This framework, conventionally called the STL, is extensible in the sense that users can easily provide containers and algorithms in addition to the ones provided as part of the standard and have these work directly with the standard containers and algorithms.

  • + Share This
  • 🔖 Save To Your Account