mirror of
https://github.com/fmtlib/fmt.git
synced 2026-07-30 16:26:27 +08:00
add a sentence about the possible interaction of format_as and general implementations, correct one internal link
This commit is contained in:
parent
a79df4504c
commit
897e394b92
@ -92,6 +92,9 @@ Use `format_as` if you want to make your type formattable as some other
|
||||
type with the same format specifiers. The `format_as` function should
|
||||
take an object of your type and return an object of a formattable type.
|
||||
It should be defined in the same namespace as your type.
|
||||
Note that `format_as` is not suitable for user-defined types which are already
|
||||
formattable due to one of the general implementations (e.g. in
|
||||
[`fmt/ranges.h`](#ranges-api)), specialize `formatter` explicitly in these cases.
|
||||
|
||||
Example ([run](https://godbolt.org/z/nvME4arz8)):
|
||||
|
||||
@ -472,7 +475,7 @@ Using `fmt::join`, you can separate tuple elements with a custom separator:
|
||||
- [`std::tm`](https://en.cppreference.com/w/cpp/chrono/c/tm)
|
||||
|
||||
The format syntax is described in [Chrono Format Specifications](syntax.md#
|
||||
chrono-format-specifications).
|
||||
chrono-format-spec).
|
||||
|
||||
**Example**:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user