Boost Knowledge Base
Boost is a collection of peer-reviewed, portable C++ libraries that sit one layer above the
standard library. Many of today's standard facilities — shared_ptr, optional, variant,
filesystem, thread, <random>, <chrono> — were first prototyped in Boost and later
standardised. These docs cover the libraries you actually reach for in real projects: what each one
solves, when to prefer it over the standard equivalent, and the gotchas that bite people.
Roughly outside-in: Introduction → Build & Integration get you compiling against Boost; the middle sections (Core, Smart Pointers, Containers, Strings, Algorithms) are the day-to-day utilities; the later sections (Concurrency, I/O, Networking, Serialization, Graph, Diagnostics) are the larger, domain-specific libraries. Each folder is self-contained — follow the cross-links between pages.
Sections
| Section | What it covers | |
|---|---|---|
| Introduction | What Boost is, its philosophy, installing it, header-only vs compiled, relation to the standard | |
| Build & Integration | b2 (Boost.Build), CMake, vcpkg/Conan, Boost.Config portability macros | |
| Core & Utilities | Core, Utility, Assert, Optional, Variant, Any, lexical_cast | |
| Smart Pointers & Memory | shared_ptr, intrusive_ptr, scoped_ptr, Pool, Align | |
| Containers | Container, Unordered, MultiIndex, Bimap, Intrusive, circular_buffer | |
| Strings & Text | String Algo, Format, Tokenizer, Regex, Spirit | |
| Algorithms, Iterators & Ranges | Algorithm, Range, Iterator adaptors, BOOST_FOREACH | |
| Functional & Metaprogramming | Function, Bind, Phoenix, Hana, MPL, Fusion, TypeTraits | |
| Math & Numerics | Math, Multiprecision, Random, Rational, numeric conversion, Accumulators, uBLAS | |
| Concurrency & Async | Thread, Atomic, Asio, Lockfree, Fiber, Coroutine2, Interprocess | |
| I/O & System | Filesystem, Iostreams, Program_options, Process, DLL, System | |
| Networking | TCP/UDP with Asio, HTTP/WebSocket with Beast | |
| Serialization & Data | Serialization, PropertyTree, JSON | |
| Date, Time & Units | Date_Time, Chrono, Units (dimensional analysis) | |
| Graph & Geometry | The Boost Graph Library, Geometry, Polygon | |
| Diagnostics & Testing | Boost.Test, Stacktrace, Log | |
| Language Tools & Misc | Preprocessor, UUID, Signals2 |
How the pieces relate
Suggested reading paths
- New to Boost: What is Boost → Installation → CMake integration → Optional → smart pointers. Enough to use Boost in a real build.
- Coming from the standard library: read Boost and the standard, then the Boost versions of facilities you already know — Optional, Variant, Filesystem, Thread — to see what Boost adds beyond
std. - Networking / servers: Asio → Asio networking → Beast → JSON.
- Systems / performance: Intrusive, Lockfree, Interprocess, Pool and Stacktrace.
- Examples assume a recent Boost (1.7x+) and compile against C++17 or later; version notes are tagged inline where they matter.
- Admonitions flag the important bits:
infofor context,tipfor guidance,notefor asides,warning/dangerfor foot-guns. - Where a Boost library has since been standardised, the page says so and points at the
stdequivalent so you can choose deliberately. - Diagrams are Mermaid; tables prefer plain words over decorative symbols.