Chapter 13

Library Reference

This chapter is a reference for the entire runtime library. As you can see, it's a big one. To help you find what you need, the chapter is organized in alphabetical order by header. If you aren't sure which header declares a particular type, macro, or other identifier, check the index. Once you find the right page, you can quickly see which header you must include to define the identifier you need.

The subsections in each header's section describe the functions, macros, classes, and other entities declared and defined in the header. The name of the subsection tells you what kind of entity is described in the subsection, e.g., "terminate function," "basic_string class template," and so on.

The subsection for a class, struct, or template class contains descriptions for all important members. A few obvious or do-nothing members are omitted (such as destructors) for the sake of brevity.

The entire standard library resides in the std namespace, except that macros reside outside any namespace. Be sure to check the subsection name closely, so you know whether an identifier is a macro or something else. To avoid cluttering the reference material, the std:: prefix is omitted from the descriptions. Examples, however, are complete and show proper use of the namespace prefix.

C++ permits two kinds of library implementations: freestanding and hosted. The traditional desktop computer is a hosted environment. A hosted implementation must implement the entire standard.

A freestanding implementation is free to implement a subset of the standard library. The subset must provide at least the following headers, and can optionally provide more:

<cstdarg>, <cstddef>, <cstdlib>, <exception>, <limits>, <new>, <typeinfo>

Follow the links below for details on the individual sections:

<algorithm> <complex> <cwctype> <iterator> <set>
<bitset> <csetjmp> <deque> <limits> <sstream>
<cassert> <csignal> <exception> <list> <stack>
<cctype> <cstdarg> <fstream> <locale> <stdexcept>
<cerrno> <cstddef> <functional> <map> <streambuf>
<cfloat> <cstdio> <iomanip> <memory> <string>
<ciso646> <cstdlib> <ios> <new> <typeinfo>
<climits> <cstring> <iosfwd> <numeric> <utility>
<clocale> <ctime> <iostream> <ostream> <valarray>
<cmath> <cwchar> <istream> <queue> <vector>