The C++ Standard Library: A Tutorial and Reference

Book description

The C++ standard library provides a set of common classes and interfaces that greatly extend the core C++ language. The library, however, is not self-explanatory. To make full use of its components-and to benefit from their power-you need a resource that does far more than list the classes and their functions.

The C++ Standard Library not only provides comprehensive documentation of each library component, it also offers clearly written explanations of complex concepts, describes the practical programming details needed for effective use, and gives example after example of working code.

This thoroughly up-to-date book reflects the newest elements of the C++ standard library incorporated into the full ANSI/ISO C++ language standard. In particular, the text focuses on the Standard Template Library (STL), examining containers, iterators, function objects, and STL algorithms. You will also find detailed coverage of special containers, strings, numerical classes, internationalization, and the IOStream library. Each component is presented in depth, with an introduction to its purpose and design, examples, a detailed description, traps and pitfalls, and the exact signature and definition of its classes and their functions. An insightful introduction to fundamental concepts and an overview of the library will help bring newcomers quickly up to speed.

Comprehensive, detailed, readable, and practical, The C++ Standard Library is the C++ resource you will turn to again and again. An accompanying Web site, including source code, can be found at http://www.josuttis.com/.



0201379260B04062001

Table of contents

  1. Copyright
  2. Preface
    1. Acknowledgments
  3. 1. About this Book
    1. 1.1. Why this Book
    2. 1.2. What You Should Know Before Reading this Book
    3. 1.3. Style and Structure of the Book
    4. 1.4. How to Read this Book
    5. 1.5. State of the Art
    6. 1.6. Example Code and Additional Information
    7. 1.7. Feedback
  4. 2. Introduction to C++ and the Standard Library
    1. 2.1. History
    2. 2.2. New Language Features
      1. 2.2.1. Templates
        1. Nontype Template Parameters
        2. Default Template Parameters
        3. Keyword typename
        4. Member Templates
        5. Nested Template Classes
      2. 2.2.2. Explicit Initialization for Fundamental Types
      3. 2.2.3. Exception Handling
      4. 2.2.4. Namespaces
      5. 2.2.5. Type bool
      6. 2.2.6. Keyword explicit
      7. 2.2.7. New Operators for Type Conversion
      8. 2.2.8. Initialization of Constant Static Members
      9. 2.2.9. Definition of main()
    3. 2.3. Complexity and the Big-O Notation
  5. 3. General Concepts
    1. 3.1. Namespace std
    2. 3.2. Header Files
    3. 3.3. Error and Exception Handling
      1. 3.3.1. Standard Exception Classes
        1. Exception Classes for Language Support
        2. Exception Classes for the Standard Library
        3. Exception Classes for Errors Outside the Scope of a Program
        4. Exceptions Thrown by the Standard Library
        5. Header Files for Exception Classes
      2. 3.3.2. Members of Exception Classes
      3. 3.3.3. Throwing Standard Exceptions
      4. 3.3.4. Deriving Standard Exception Classes
    4. 3.4. Allocators
  6. 4. Utilities
    1. 4.1. Pairs
      1. Pair Comparisons
    2. 4.1.1. Convenience Function make_pair()
    3. 4.1.2. Examples of Pair Usage
    4. 4.2. Class auto_ptr
      1. 4.2.1. Motivation of Class auto_ptr
      2. 4.2.2. Transfer of Ownership by auto_ptr
        1. Source and Sink
        2. Caveat
      3. 4.2.3. auto_ptrs as Members
      4. 4.2.4. Misusing auto_ptrs
      5. 4.2.5. auto_ptr Examples
      6. 4.2.6. Class auto_ptr in Detail
        1. Type Definitions
        2. Constructors, Assignments, and Destructors
        3. Value Access
        4. Value Manipulation
        5. Conversions
        6. Sample Implementation of Class auto_ptr
    5. 4.3. Numeric Limits
      1. Class numeric_limits<>
      2. Example of Using numeric_limits<>
    6. 4.4. Auxiliary Functions
      1. 4.4.1. Processing the Minimum and Maximum
      2. 4.4.2. Swapping Two Values
    7. 4.5. Supplementary Comparison Operators
    8. 4.6. Header Files <cstddef> and <cstdlib>
      1. 4.6.1. Definitions in <cstddef>
      2. 4.6.2. Definitions in <cstdlib>
  7. 5. The Standard Template Library
    1. 5.1. STL Components
    2. 5.2. Containers
      1. 5.2.1. Sequence Containers
        1. Vectors
        2. Deques
        3. Lists
        4. Strings
        5. Ordinary Arrays
      2. 5.2.2. Associative Containers
      3. 5.2.3. Container Adapters
    3. 5.3. Iterators
      1. 5.3.1. Examples of Using Associative Containers
        1. Examples of Using Sets and Multisets
        2. Examples of Using Maps and Multimaps
        3. Maps as Associative Arrays
      2. 5.3.2. Iterator Categories
    4. 5.4. Algorithms
      1. 5.4.1. Ranges
      2. 5.4.2. Handling Multiple Ranges
    5. 5.5. Iterator Adapters
      1. 5.5.1. Insert Iterators
      2. 5.5.2. Stream Iterators
      3. 5.5.3. Reverse Iterators
    6. 5.6. Manipulating Algorithms
      1. 5.6.1. "Removing" Elements
      2. 5.6.2. Manipulating Algorithms and Associative Containers
      3. 5.6.3. Algorithms versus Member Functions
    7. 5.7. User-Defined Generic Functions
    8. 5.8. Functions as Algorithm Arguments
      1. 5.8.1. Examples of Using Functions as Algorithm Arguments
      2. 5.8.2. Predicates
        1. Unary Predicates
        2. Binary Predicates
    9. 5.9. Function Objects
      1. 5.9.1. What Are Function Objects?
      2. 5.9.2. Predefined Function Objects
    10. 5.10. Container Elements
      1. 5.10.1. Requirements for Container Elements
      2. 5.10.2. Value Semantics or Reference Semantics
    11. 5.11. Errors and Exceptions Inside the STL
      1. 5.11.1. Error Handling
      2. 5.11.2. Exception Handling
    12. 5.12. Extending the STL
  8. 6. STL Containers
    1. 6.1. Common Container Abilities and Operations
      1. 6.1.1. Common Container Abilities
      2. 6.1.2. Common Container Operations
        1. Initialization
        2. Size Operations
        3. Comparisons
        4. Assignments and swap ()
    2. 6.2. Vectors
      1. 6.2.1. Abilities of Vectors
        1. Size and Capacity
      2. 6.2.2. Vector Operations
        1. Create, Copy, and Destroy Operations
        2. Nonmodifying Operations
        3. Assignments
        4. Element Access
        5. Iterator Functions
        6. Inserting and Removing Elements
      3. 6.2.3. Using Vectors as Ordinary Arrays
      4. 6.2.4. Exception Handling
      5. 6.2.5. Examples of Using Vectors
      6. 6.2.6. Class vector<bool>
    3. 6.3. Deques
      1. 6.3.1. Abilities of Deques
      2. 6.3.2. Deque Operations
      3. 6.3.3 . Exception Handling
      4. 6.3.4 . Examples of Using Deques
    4. 6.4 . Lists
      1. 6.4.1 . Abilities of Lists
      2. 6.4.2 . List Operations
        1. Create, Copy, and Destroy Operations
        2. Nonmodifying Operations
        3. Assignments
        4. Element Access
        5. Iterator Functions
        6. Inserting and Removing Elements
        7. Splice Functions
      3. 6.4.3. Exception Handling
      4. 6.4.4. Examples of Using Lists
    5. 6.5. Sets and Multisets
      1. 6.5.1. Abilities of Sets and Multisets
      2. 6.5.2. Set and Multiset Operations
        1. Create, Copy, and Destroy Operations
        2. Nonmodifying Operations
        3. Special Search Operations
        4. Assignments
        5. Iterator Functions
        6. Inserting and Removing Elements
      3. 6.5.3. Exception Handling
      4. 6.5.4. Examples of Using Sets and Multisets
      5. 6.5.5. Example of Specifying the Sorting Criterion at Runtime
    6. 6.6. Maps and Multimaps
      1. 6.6.1. Abilities of Maps and Multimaps
      2. 6.6.2. Map and Multimap Operations
        1. Create, Copy, and Destroy Operations
        2. Nonmodifying and Special Search Operations
        3. Special Search Operations
        4. Assignments
        5. Iterator Functions and Element Access
          1. Inserting and Removing Elements
      3. 6.6.3. Using Maps as Associative Arrays
      4. 6.6.4. Exception Handling
      5. 6.6.5. Examples of Using Maps and Multimaps
        1. Using a Map as an Associative Array
        2. Using a Multimap as a Dictionary
        3. Find Elements with Certain Values
      6. 6.6.6. Example with Maps, Strings, and Sorting Criterion at Runtime
    7. 6.7. Other STL Containers
      1. 6.7.1. Strings as STL Containers
      2. 6.7.2. Ordinary Arrays as STL Containers
        1. Using Ordinary Arrays Directly
        2. An Array Wrapper
      3. 6.7.3. Hash Tables
    8. 6.8. Implementing Reference Semantics
    9. 6.9. When to Use which Container
    10. 6.10. Container Types and Members in Detail
      1. 6.10.1. Type Definitions
      2. 6.10.2. Create, Copy, and Destroy Operations
      3. 6.10.3. Nonmodifying Operations
        1. Size Operations
        2. Capacity Operations
        3. Comparison Operations
        4. Special Nonmodifying Operations for Associative Containers
      4. 6.10.4. Assignments
      5. 6.10.5. Direct Element Access
      6. 6.10.6. Operations to Generate Iterators
      7. 6.10.7. Inserting and Removing Elements
      8. 6.10.8. Special Member Functions for Lists
      9. 6.10.9. Allocator Support
        1. Fundamental Allocator Members
        2. Constructors with Optional Allocator Parameters
      10. 6.10.10. Overview of Exception Handling in STL Containers
  9. 7. STL Iterators
    1. 7.1. Header Files for Iterators
    2. 7.2. Iterator Categories
      1. 7.2.1. Input Iterators
      2. 7.2.2. Output Iterators
      3. 7.2.3. Forward Iterators
      4. 7.2.4. Bidirectional Iterators
      5. 7.2.5. Random Access Iterators
      6. 7.2.6. The Increment and Decrement Problem of Vector Iterators
    3. 7.3. Auxiliary Iterator Functions
      1. 7.3.1. Stepping Iterators Using advance()
      2. 7.3.2. Processing Iterator Distance Using distance()
      3. 7.3.3. Swapping Iterator Values Using iter_swap()
    4. 7.4. Iterator Adapters
      1. 7.4.1. Reverse Iterators
        1. Iterators and Reverse Iterators
        2. Converting Reverse Iterators Back Using base()
      2. 7.4.2. Insert Iterators
        1. Functionality of Insert Iterators
        2. Kinds of Insert Iterators
        3. Back Inserters
        4. Front Inserters
        5. General Inserters
        6. A User-Defined Inserter for Associative Containers
      3. 7.4.3. Stream Iterators
        1. Ostream Iterators
        2. Istream Iterators
        3. Another Example of Stream Iterators
    5. 7.5. Iterator Traits
      1. 7.5.1. Writing Generic Functions for Iterators
        1. Using Iterator Types
        2. Using Iterator Categories
        3. Implementation of distance()
      2. 7.5.2. User-Defined Iterators
  10. 8. STL Function Objects
    1. 8.1. The Concept of Function Objects
      1. 8.1.1. Function Objects as Sorting Criteria
      2. 8.1.2. Function Objects with Internal State
      3. 8.1.3. The Return Value of for_each()
      4. 8.1.4. Predicates versus Function Objects
    2. 8.2. Predefined Function Objects
      1. 8.2.1. Function Adapters
      2. 8.2.2. Function Adapters for Member Functions
      3. 8.2.3. Function Adapters for Ordinary Functions
      4. 8.2.4. User-Defined Function Objects for Function Adapters
    3. 8.3. Supplementary Composing Function Objects
      1. 8.3.1. Unary Compose Function Object Adapters
        1. Nested Computations by Using compose_f_gx
        2. Combining Two Criteria by Using compose_f_gx_hx
      2. 8.3.2. Binary Compose Function Object Adapters
  11. 9. STL Algorithms
    1. 9.1. Algorithm Header Files
    2. 9.2. Algorithm Overview
      1. 9.2.1. A Brief Introduction
      2. 9.2.2. Classification of Algorithms
        1. Nonmodifying Algorithms
        2. Modifying Algorithms
        3. Removing Algorithms
        4. Mutating Algorithms
        5. Sorting Algorithms
        6. Sorted Range Algorithms
        7. Numeric Algorithms
    3. 9.3. Auxiliary Functions
    4. 9.4. The for_each() Algorithm
    5. 9.5. Nonmodifying Algorithms
      1. 9.5.1. Counting Elements
      2. 9.5.2. Minimum and Maximum
      3. 9.5.3. Searching Elements
        1. Search First Matching Element
        2. Search First n Matching Consecutive Elements
        3. Search First Subrange
        4. Search Last Subrange
        5. Search First of Several Possible Elements
        6. Search Two Adjacent, Equal Elements
      4. 9.5.4. Comparing Ranges
        1. Testing Equality
        2. Search the First Difference
        3. Testing for "Less Than"
    6. 9.6. Modifying Algorithms
      1. 9.6.1. Copying Elements
      2. 9.6.2. Transforming and Combining Elements
        1. Transforming Elements
        2. Combining Elements of Two Sequences
      3. 9.6.3. Swapping Elements
      4. 9.6.4. Assigning New Values
        1. Assigning the Same Value
        2. Assigning Generated Values
      5. 9.6.5. Replacing Elements
        1. Replacing Values Inside a Sequence
        2. Copying and Replacing Elements
    7. 9.7. Removing Algorithms
      1. 9.7.1. Removing Certain Values
        1. Removing Elements in a Sequence
          1. Removing Elements While Copying
      2. 9.7.2. Removing Duplicates
        1. Removing Consecutive Duplicates
        2. Removing Duplicates While Copying
    8. 9.8. Mutating Algorithms
      1. 9.8.1. Reversing the Order of Elements
      2. 9.8.2. Rotating Elements
        1. Rotating Elements Inside a Sequence
        2. Rotating Elements While Copying
      3. 9.8.3. Permuting Elements
      4. 9.8.4. Shuffling Elements
      5. 9.8.5. Moving Elements to the Front
    9. 9.9. Sorting Algorithms
      1. 9.9.1. Sorting All Elements
      2. 9.9.2. Partial Sorting
      3. 9.9.3. Sorting According to the nth Element
      4. 9.9.4. Heap Algorithms
        1. Heap Algorithms in Detail
        2. Example Using Heaps
    10. 9.10. Sorted Range Algorithms
      1. 9.10.1. Searching Elements
        1. Checking Whether One Element Is Present
        2. Checking Whether Several Elements Are Present
        3. Searching First or Last Possible Position
        4. Searching First and Last Possible Positions
      2. 9.10.2. Merging Elements
        1. Processing the Sum of Two Sorted Sets
        2. Processing the Union of Two Sorted Sets
        3. Processing the Intersection of Two Sorted Sets
        4. Processing the Difference of Two Sorted Sets
        5. Example of All Merging Algorithms
        6. Merging Consecutive Sorted Ranges
    11. 9.11. Numeric Algorithms
      1. 9.11.1. Processing Results
        1. Computing the Result of One Sequence
        2. Computing the Inner Product of Two Sequences
      2. 9.11.2. Converting Relative and Absolute Values
        1. Converting Relative Values into Absolute Values
        2. Converting Absolute Values into Relative Values
        3. Example of Converting Relative Values into Absolute Values
  12. 10. Special Containers
    1. 10.1. Stacks
      1. 10.1.1. The Core Interface
      2. 10.1.2. Example of Using Stacks
      3. 10.1.3. Class stack<> in Detail
        1. Type Definitions
        2. Operations
      4. 10.1.4. A User-Defined Stack Class
    2. 10.2. Queues
      1. 10.2.1. The Core Interface
      2. 10.2.2. Example of Using Queues
      3. 10.2.3. Class queue<> in Detail
        1. Type Definitions
        2. Operations
      4. 10.2.4. A User-Defined Queue Class
    3. 10.3. Priority Queues
      1. 10.3.1. The Core Interface
      2. 10.3.2. Example of Using Priority Queues
      3. 10.3.3. Class priority_queue<> in Detail
        1. Type Definitions
        2. Constructors
        3. Other Operations
    4. 10.4. Bitsets
      1. 10.4.1. Examples of Using Bitsets
        1. Using Bitsets as Set of Flags
        2. Using Bitsets for I/O with Binary Representation
      2. 10.4.2. Class bitset in Detail
        1. Create, Copy, and Destroy Operations
        2. Nonmanipulating Operations
        3. Manipulating Operations
        4. Access with Operator [ ]
        5. Creating New Modified Bitsets
        6. Operations for Type Conversions
        7. Input/Output Operations
  13. 11. Strings
    1. 11.1. Motivation
      1. 11.1.1. A First Example: Extracting a Temporary File Name
      2. 11.1.2. A Second Example: Extracting Words and Printing Them Backward
    2. 11.2. Description of the String Classes
      1. 11.2.1. String Types
        1. Header File
        2. Template Class basic_string<>
        3. Types string and wstring
      2. 11.2.2. Operation Overview
        1. String Operation Arguments
        2. Operations that Are Not Provided
      3. 11.2.3. Constructors and Destructors
      4. 11.2.4. Strings and C-Strings
      5. 11.2.5. Size and Capacity
      6. 11.2.6. Element Access
      7. 11.2.7. Comparisons
      8. 11.2.8. Modifiers
        1. Assignments
        2. Swapping Values
        3. Making Strings Empty
        4. Inserting and Removing Characters
      9. 11.2.9. Substrings and String Concatenation
      10. 11.2.10. Input/Output Operators
      11. 11.2.11. Searching and Finding
      12. 11.2.12. The Value npos
      13. 11.2.13. Iterator Support for Strings
        1. Iterator Functions for Strings
        2. Example of Using String Iterators
      14. 11.2.14. Internationalization
      15. 11.2.15. Performance
      16. 11.2.16. Strings and Vectors
    3. 11.3. String Class in Detail
      1. 11.3.1. Type Definitions and Static Values
      2. 11.3.2. Create, Copy, and Destroy Operations
      3. 11.3.3. Operations for Size and Capacity
        1. Size Operations
        2. Capacity Operations
      4. 11.3.4. Comparisons
      5. 11.3.5. Character Access
      6. 11.3.6. Generating C-Strings and Character Arrays
      7. 11.3.7. Modifying Operations
        1. Assignments
        2. Appending Characters
        3. Inserting Characters
        4. Erasing Characters
        5. Changing the Size
        6. Replacing Characters
      8. 11.3.8. Searching and Finding
        1. Find a Character
        2. Find a Substring
        3. Find First of Different Characters
        4. Find Last of Different Characters
      9. 11.3.9. Substrings and String Concatenation
      10. 11.3.10. Input/Output Functions
      11. 11.3.11. Generating Iterators
      12. 11.3.12. Allocator Support
  14. 12. Numerics
    1. 12.1. Complex Numbers
      1. 12.1.1. Examples Using Class Complex
      2. 12.1.2. Operations for Complex Numbers
        1. Create, Copy, and Assign Operations
        2. Implicit Type Conversions
        3. Value Access
        4. Comparison Operations
        5. Arithmetic Operations
        6. Input/Output Operations
        7. Transcendental Functions
      3. 12.1.3. Class complex<> in Detail
        1. Type Definitions
        2. Create, Copy, and Assign Operations
        3. Element Access
        4. Input/Output Operations
        5. Operators
        6. Transcendental Functions
    2. 12.2. Valarrays
      1. 12.2.1. Getting to Know Valarrays
        1. Header File
        2. Creating Valarrays
        3. Valarray Operations
        4. Transcendental Functions
      2. 12.2.2. Valarray Subsets
        1. Valarray Subset Problems
        2. Slices
        3. General Slices
        4. Masked Subsets
        5. Indirect Subsets
      3. 12.2.3. Class valarray in Detail
        1. Create, Copy, and Destroy Operations
        2. Assignment Operations
        3. Member Functions
        4. Element Access
        5. Valarray Operators
        6. Transcendental Functions
      4. 12.2.4. Valarray Subset Classes in Detail
        1. Class slice and Class slice_array
        2. Class gslice and Class gslice_array
        3. Class mask_array
        4. Class indirect_array
    3. 12.3. Global Numeric Functions
  15. 13. Input/Output Using Stream Classes
    1. 13.1. Common Background of I/O Streams
      1. 13.1.1. Stream Objects
      2. 13.1.2. Stream Classes
      3. 13.1.3. Global Stream Objects
      4. 13.1.4. Stream Operators
      5. 13.1.5. Manipulators
      6. 13.1.6. A Simple Example
    2. 13.2. Fundamental Stream Classes and Objects
      1. 13.2.1. Classes and Class Hierarchy
        1. Purpose of the Stream Buffer Classes
        2. Detailed Class Definitions
      2. 13.2.2. Global Stream Objects
      3. 13.2.3. Header Files
    3. 13.3. Standard Stream Operators << and >>
      1. 13.3.1. Output Operator <<
      2. 13.3.2. Input Operator >>
      3. 13.3.3. Input/Output of Special Types
        1. Type bool
        2. Types char and wchar_t
        3. Type char*
        4. Type void*
        5. Stream Buffers
        6. User-Defined Types
    4. 13.4. State of Streams
      1. 13.4.1. Constants for the State of Streams
      2. 13.4.2. Member Functions Accessing the State of Streams
      3. 13.4.3. Stream State and Boolean Conditions
      4. 13.4.4. Stream State and Exceptions
    5. 13.5. Standard Input/Output Functions
      1. 13.5.1. Member Functions for Input
      2. 13.5.2. Member Functions for Output
      3. 13.5.3. Example Uses
    6. 13.6. Manipulators
      1. 13.6.1. How Manipulators Work
      2. 13.6.2. User-Defined Manipulators
    7. 13.7. Formatting
      1. 13.7.1. Format Flags
      2. 13.7.2. Input/Output Format of Boolean Values
      3. 13.7.3. Field Width, Fill Character, and Adjustment
        1. Using Field Width, Fill Character, and Adjustment for Output
        2. Using Field Width for Input
      4. 13.7.4. Positive Sign and Uppercase Letters
      5. 13.7.5. Numeric Base
      6. 13.7.6. Floating-Point Notation
      7. 13.7.7. General Formatting Definitions
    8. 13.8. Internationalization
    9. 13.9. File Access
      1. 13.9.1. File Flags
      2. 13.9.2. Random Access
      3. 13.9.3. Using File Descriptors
    10. 13.10. Connecting Input and Output Streams
      1. 13.10.1. Loose Coupling Using tie()
      2. 13.10.2. Tight Coupling Using Stream Buffers
      3. 13.10.3. Redirecting Standard Streams
      4. 13.10.4. Streams for Reading and Writing
    11. 13.11. Stream Classes for Strings
      1. 13.11.1. String Stream Classes
      2. 13.11.2. char* Stream Classes
    12. 13.12. Input/Output Operators for User-Defined Types
      1. 13.12.1. Implementing Output Operators
      2. 13.12.2. Implementing Input Operators
      3. 13.12.3. Input/Output Using Auxiliary Functions
      4. 13.12.4. User-Defined Operators Using Unformatted Functions
      5. 13.12.5. User-Defined Format Flags
      6. 13.12.6. Conventions for User-Defined Input/Output Operators
    13. 13.13. The Stream Buffer Classes
      1. 13.13.1. User's View of Stream Buffers
      2. 13.13.2. Stream Buffer Iterators
        1. Output Stream Buffer Iterators
        2. Input Stream Buffer Iterators
        3. Example Use of Stream Buffer Iterators
      3. 13.13.3. User-Defined Stream Buffers
        1. User-Defined Output Buffers
        2. User-Defined Input Buffers
    14. 13.14. Performance Issues
      1. 13.14.1. Synchronization with C's Standard Streams
      2. 13.14.2. Buffering in Stream Buffers
      3. 13.14.3. Using Stream Buffers Directly
  16. 14. Internationalization
    1. 14.1. Different Character Encodings
      1. 14.1.1. Wide-Character and Multibyte Text
      2. 14.1.2. Character Traits
      3. 14.1.3. Internationalization of Special Characters
    2. 14.2. The Concept of Locales
      1. 14.2.1. Using Locales
      2. 14.2.2. Locale Facets
    3. 14.3. Locales in Detail
    4. 14.4. Facets in Detail
      1. 14.4.1. Numeric Formatting
        1. Numeric Punctuation
        2. Numeric Formatting
        3. Numeric Parsing
      2. 14.4.2. Time and Date Formatting
        1. Time and Date Parsing
        2. Time and Date Formatting
      3. 14.4.3. Monetary Formatting
        1. Monetary Punctuation
        2. Monetary Formatting
        3. Monetary Parsing
      4. 14.4.4. Character Classification and Conversion
        1. Character Classification
        2. Specialization of ctype<> for Type char
        3. Global Convenience Functions for Character Classification
        4. Character Encoding Conversion
      5. 14.4.5. String Collation
      6. 14.4.6. Internationalized Messages
  17. 15. Allocators
    1. 15.1. Using Allocators as an Application Programmer
    2. 15.2. Using Allocators as a Library Programmer
      1. Raw Storage Iterators
      2. Temporary Buffers
    3. 15.3. The Default Allocator
    4. 15.4. A User-Defined Allocator
    5. 15.5. Allocators in Detail
      1. 15.5.1. Type Definitions
      2. 15.5.2. Operations
    6. 15.6. Utilities for Uninitialized Memory in Detail
  18. Internet Resources
    1. Where You Can Get the Standard
      1. Newsgroups
    2. Internet Addresses/URLs
  19. Bibliography

Product information

  • Title: The C++ Standard Library: A Tutorial and Reference
  • Author(s):
  • Release date: August 1999
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780201379266