std::visit_format_arg(3)
β¨ NAME β¨
std::visit_format_arg β bestie, it's literally std::visit_format_arg. This is the page for std::visit_format_arg(3) in the C++ Standard Libary manual, and we are going to get through it together π«Ά.
πΈ SYNOPSIS πΈ
Okay so the synopsis is giving header, template, deprecation realness. Here it is, exactly:
Defined in header <format>
template< class Visitor, class Context > (since
C++20)
/* see below */ visit_format_arg( Visitor&& vis,
(deprecated in C++26)
std::basic_format_arg<Context> arg );
It applies the visitor vis to the object contained in arg. Periodt.
Equivalent to std::visit(std::forward<Visitor>(vis), value), where value is the std::variant stored in arg.
π PARAMETERS π
visβ a Callable that accepts every possible alternative fromarg. Every. Single. One. No skipping, bestie π .argβ astd::basic_format_argto be visited.
π RETURN VALUE π
The value returned by the selected invocation of the visitor. That's the whole answer, and it ate β¨.
π NOTES π
As of C++26, std::visit_format_arg is deprecated in favor of the visit member functions of std::basic_format_arg.
Deprecated means "please stop using this, bestie." It's not a warning to ignore β it's the library telling you the member functions are the main character now π.
π§ͺ EXAMPLE π§ͺ
This section is incomplete Reason: no example
π SEE ALSO π
make_format_argsβ creates a type-erased object referencing all formatting arguments, convertible toformat_argsβ(C++20)β(function template)make_wformat_argsβ(C++20)
π·οΈ CATEGORY π·οΈ
- Todo no example
source/version and date, for the record: http://cppreference.com Β· 2024.06.10 β bye bestie, go visit some format args for me π«Άπ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms