Some documentation improvements (#4631)

This commit is contained in:
user202729
2025-12-17 06:53:01 -08:00
committed by GitHub
parent 7bce22571a
commit 2e819a11f2
3 changed files with 13 additions and 3 deletions
+8
View File
@@ -4147,6 +4147,14 @@ template <typename T, typename Char = char> struct nested_formatter {
inline namespace literals {
#if FMT_USE_NONTYPE_TEMPLATE_ARGS
/**
* User-defined literal equivalent of `fmt::arg`, but with compile-time checks.
*
* **Example**:
*
* using namespace fmt::literals;
* fmt::print("The answer is {answer}.", "answer"_a=42);
*/
template <detail::fixed_string S> constexpr auto operator""_a() {
using char_t = remove_cvref_t<decltype(*S.data)>;
return detail::udl_arg<char_t, sizeof(S.data) / sizeof(char_t), S>();