How fmtlib/fmt works
{fmt} is a C++ formatting library. The principal workflow accepts a format string and typed arguments, formats them into output, and either returns the result or writes it to a destination. Extensions cover compile-time formatting, printf compatibility, chrono and range formatting, Unicode character types, colors, and standard-library types; OS and stream adapters provide additional output paths. The graph reflects README-described usage and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: format.h Format engine · fmt.cc C++ module · os.h OS file API · core.h Core API
Components 19
Formatting core
- Core API
include/fmt/core.h - Format engine
include/fmt/format.h - Format internals
include/fmt/format-inl.h - Argument store
include/fmt/args.h
Formatting extensions
- Compiled formats
include/fmt/compile.h - Printf compatibility
include/fmt/printf.h - Chrono formatting
include/fmt/chrono.h - Ranges and tuples
include/fmt/ranges.h - Unicode formats
include/fmt/xchar.h - Color and styles
include/fmt/color.h - Enum formatting
include/fmt/enum.h - Standard types
include/fmt/std.h
Output adapters
- Stream adapter
include/fmt/ostream.h - OS file API
include/fmt/os.h - C API
include/fmt/fmt-c.h
Compiled runtime
- OS implementation
src/os.cc - C++ module
src/fmt.cc
Other components
- C++ caller
- Formatted output
Connections 30
- C++ caller → Core API: calls
README.md - Core API → Format engine: formats with
include/fmt/core.h - Format engine → Format internals: uses
include/fmt/format.h - Format engine → Formatted output: returns or writes
README.md - C++ caller → Compiled formats: compiles formats
README.md - C++ caller → Printf compatibility: uses printf API
README.md - C++ caller → Chrono formatting: formats dates
README.md - C++ caller → Ranges and tuples: formats containers
README.md - C++ caller → Unicode formats: uses character types
include/fmt/xchar.h - C++ caller → Color and styles: prints styled text
README.md - C++ caller → Enum formatting: formats enums
- C++ caller → Standard types: formats standard types
- C++ caller → Stream adapter: uses stream adapter
- C++ caller → OS file API: writes files
README.md - OS file API → OS implementation: implemented by
src/os.cc - C++ caller → C API: uses C interface
- C++ module → Format engine: includes
src/fmt.cc - C++ module → Chrono formatting: includes
src/fmt.cc - C++ module → Color and styles: includes
src/fmt.cc - C++ module → Compiled formats: includes
src/fmt.cc - C++ module → OS file API: includes
src/fmt.cc - Format engine → Core API: includes
include/fmt/format.h - Argument store → Format engine: supports arguments
include/fmt/args.h - Compiled formats → Format engine: uses
include/fmt/compile.h - Printf compatibility → Format engine: uses
include/fmt/printf.h - Chrono formatting → Format engine: uses
include/fmt/chrono.h - Ranges and tuples → Format engine: uses
include/fmt/ranges.h - Color and styles → Format engine: uses
include/fmt/color.h - Stream adapter → Format engine: formats through
include/fmt/ostream.h - OS file API → Format engine: formats through
include/fmt/os.h