Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
`fmt::ostream_formatter`) and `fmt::streamed` from the C++20 module
(https://github.com/fmtlib/fmt/pull/4861). Thanks @avikivity.

- Documented how to use the C++20 module with CMake, including the
`fmt::fmt-module` target and compiler requirements
(https://github.com/fmtlib/fmt/issues/4237).

- Optimized 128-bit integer formatting by reducing the value to 64-bit
chunks instead of doing repeated 128-bit division, giving a ~5x speedup
on full-range values.
Expand Down
16 changes: 16 additions & 0 deletions doc/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ In order to use the header-only target or the module target, simply substitute t
`fmt::fmt` in the above steps with `fmt::fmt-header-only` or `fmt::fmt-module`
accordingly.

### Using the C++20 Module

Link your target to `fmt::fmt-module` and import `fmt` instead of including a
{fmt} header:

target_link_libraries(<your-target> PRIVATE fmt::fmt-module)

import fmt;

int main() {
fmt::print("Hello, world!\\n");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is extra \ here.

}

The module target requires C++20 module support in CMake and the compiler. For
GCC, use CMake 3.28 or newer, Ninja 1.11 or newer, and GCC 15 or newer.

## Installation

### Debian/Ubuntu
Expand Down
Loading