{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams. The format API is similar in spirit to the C printf family of function but is safer, simpler and several times faster than common standard library implementations. The format string syntax is similar to the one used by str.format in Python. The library is fully type safe, automatic memory management prevents buffer overflow, errors in format strings are reported using exceptions or at compile time. The library produces compact per-call compiled code. The library is highly portable and relies only on a small set of C++11 features, like variadic templates, type traits, rvalue references, decltype, trailing return, types, deleted functions, alias templates. These are available in GCC 4.8, Clang 3.0, MSVC 19.0 (2015) and more recent compiler version. For older compilers use {fmt} version 4.x which is maintained and only requires C++98.

Features

  • Fully type safe, automatic memory management prevents buffer overflow
  • Simple format API including positional arguments for localization
  • Implementation of C++20 std::format
  • Format string syntax like that of Python's format
  • Self-contained code base with no external dependencies in the core library
  • The library produces compact per-call compiled code

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow fmt

fmt Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI Studio. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of fmt!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

C++

Related Categories

C++ Data Formats Software, C++ Code Formatters

Registered

2021-01-19