The GNU C++ Library


Table of Contents

The GNU C++ Library Manual
I. Introduction
1. Status
Implementation Status
C++ 1998/2003
C++ 200x
C++ TR1
C++ TR 24733
License
The Code: GPL
The Documentation: GPL, FDL
Bugs
Implementation Bugs
Standard Bugs
2. Setup
Prerequisites
Configure
Make
3. Using
Command Options
Headers
Header Files
Mixing Headers
The C Headers and namespace std
Precompiled Headers
Macros
Namespaces
Available Namespaces
namespace std
Using Namespace Composition
Linking
Almost Nothing
Finding Dynamic or Shared Libraries
Concurrency
Prerequisites
Thread Safety
Atomics
IO
Containers
Exceptions
Exception Safety
Exception Neutrality
Doing without
Compatibility
Debugging Support
Using g++
Debug Versions of Library Binary Files
Memory Leak Hunting
Data Race Hunting
Using gdb
Tracking uncaught exceptions
Debug Mode
Compile Time Checking
Profile-based Performance Analysis
II. Standard Contents
4. Support
Types
Fundamental Types
Numeric Properties
NULL
Dynamic Memory
Termination
Termination Handlers
Verbose Terminate Handler
5. Diagnostics
Exceptions
API Reference
Adding Data to exception
Concept Checking
6. Utilities
Functors
Pairs
Memory
Allocators
auto_ptr
shared_ptr
Traits
7. Strings
String Classes
Simple Transformations
Case Sensitivity
Arbitrary Character Types
Tokenizing
Shrink to Fit
CString (MFC)
8. Localization
Locales
locale
Facets
ctype
codecvt
messages
9. Containers
Sequences
list
vector
Associative
Insertion Hints
bitset
Interacting with C
Containers vs. Arrays
10. Iterators
Predefined
Iterators vs. Pointers
One Past the End
11. Algorithms
Mutating
swap
12. Numerics
Complex
complex Processing
Generalized Operations
Interacting with C
Numerics vs. Arrays
C99
13. Input and Output
Iostream Objects
Stream Buffers
Derived streambuf Classes
Buffering
Memory Based Streams
Compatibility With strstream
File Based Streams
Copying a File
Binary Input and Output
Interacting with C
Using FILE* and file descriptors
Performance
14. Atomics
API Reference
15. Concurrency
API Reference
III. Extensions
16. Compile Time Checks
17. Debug Mode
Intro
Semantics
Using
Using the Debug Mode
Using a Specific Debug Container
Design
Goals
Methods
Other Implementations
18. Parallel Mode
Intro
Semantics
Using
Prerequisite Compiler Flags
Using Parallel Mode
Using Specific Parallel Components
Design
Interface Basics
Configuration and Tuning
Implementation Namespaces
Testing
Bibliography
19. Profile Mode
Intro
Using the Profile Mode
Tuning the Profile Mode
Design
Wrapper Model
Instrumentation
Run Time Behavior
Analysis and Diagnostics
Cost Model
Reports
Testing
Extensions for Custom Containers
Empirical Cost Model
Implementation Issues
Stack Traces
Symbolization of Instruction Addresses
Concurrency
Using the Standard Library in the Instrumentation Implementation
Malloc Hooks
Construction and Destruction of Global Objects
Developer Information
Big Picture
How To Add A Diagnostic
Diagnostics
Diagnostic Template
Containers
Algorithms
Data Locality
Multithreaded Data Access
Statistics
Bibliography
20. Allocators
mt_allocator
Intro
Design Issues
Implementation
Single Thread Example
Multiple Thread Example
bitmap_allocator
Design
Implementation
21. Containers
Policy Based Data Structures
HP/SGI
Deprecated HP/SGI
22. Utilities
23. Algorithms
24. Numerics
25. Iterators
26. Input and Output
Derived filebufs
27. Demangling
28. Concurrency
Design
Interface to Locks and Mutexes
Interface to Atomic Functions
Implementation
Using Builtin Atomic Functions
Thread Abstraction
Use
IV. Appendices
A. Contributing
Contributor Checklist
Reading
Assignment
Getting Sources
Submitting Patches
Directory Layout and Source Conventions
Coding Style
Bad Identifiers
By Example
Design Notes
B. Porting and Maintenance
Configure and Build Hacking
Prerequisites
Overview: What Comes from Where
Storing Information in non-AC files (like configure.host)
Coding and Commenting Conventions
The acinclude.m4 layout
GLIBCXX_ENABLE, the --enable maker
Writing and Generating Documentation
Introduction
Generating Documentation
Doxygen
Docbook
Porting to New Hardware or Operating Systems
Operating System
CPU
Character Types
Thread Safety
Numeric Limits
Libtool
Test
Organization
Running the Testsuite
Writing a new test case
Test Harness and Utilities
Special Topics
ABI Policy and Guidelines
The C++ Interface
Versioning
Allowed Changes
Prohibited Changes
Implementation
Testing
Outstanding Issues
API Evolution and Deprecation History
3.0
3.1
3.2
3.3
3.4
4.0
4.1
4.2
4.3
4.4
4.5
Backwards Compatibility
First
Second
Third
C. Free Software Needs Free Documentation
D. GNU General Public License version 3
E. GNU Free Documentation License
The GNU C++ Library API Reference
Frequently Asked Questions