Loading...
Searching...
No Matches
Classes |
Public Member Functions |
Private Types |
Private Member Functions |
Private Attributes |
Friends |
List of all members
dynamic_format_arg_store< Context > Class Template Reference
Detailed Descriptiontemplate<typename Context> class dynamic_format_arg_store< Context > \rst A dynamic version of It can be implicitly converted into Member Typedef Documentation◆ char_type
template<typename Context >
◆ stored_type
Initial value:
std::basic_string<char_type>, T>
Member Function Documentation◆ clear()
template<typename Context >
◆ data()
template<typename Context >
◆ emplace_arg() [1/2]
template<typename Context >
template<typename T >
Definition at line 1709 of file core.h. References arg(), detail::make_arg(), and detail::unwrap(). ◆ emplace_arg() [2/2]
template<typename Context >
template<typename T >
Definition at line 1704 of file core.h. References arg(), and detail::make_arg(). ◆ get_types()
template<typename Context >
Definition at line 1693 of file core.h. References detail::has_named_args_bit, and detail::is_unpacked_bit. ◆ push_back() [1/3]
template<typename Context >
template<typename T >
Adds named argument into the dynamic store for later passing to a formatting function. Definition at line 1786 of file core.h. References arg(), detail::const_check(), and dynamic_arg_list::push(). ◆ push_back() [2/3]
template<typename Context >
template<typename T >
\rst Adds an argument into the dynamic store for later passing to a formatting function. Note that custom types and string types (but not string views) are copied into the store dynamically allocating memory if necessary. Example**:: fmt::dynamic_format_arg_store<fmt::format_context> store; store.push_back(42); store.push_back("abc"); store.push_back(1.5f); std::string result = fmt::vformat("{} and {} and {}", store); \endrst Definition at line 1743 of file core.h. References arg(), detail::const_check(), dynamic_arg_list::push(), and detail::unwrap(). ◆ push_back() [3/3]
template<typename Context >
template<typename T >
\rst Adds a reference to the argument into the dynamic store for later passing to a formatting function. Supports named arguments wrapped in ``std::reference_wrapper`` via ``std::ref()``/``std::cref()``. Example**:: fmt::dynamic_format_arg_store<fmt::format_context> store; char str[] = "1234567890"; store.push_back(std::cref(str)); int a1_val{42}; auto a1 = fmt::arg("a1_", a1_val); store.push_back(std::cref(a1)); Changing str affects the output but only for string and custom types. str[0] = 'X'; std::string result = fmt::vformat("{} and {a1_}"); assert(result == "X234567890 and 42"); \endrst Definition at line 1772 of file core.h. References arg(). ◆ reserve()
template<typename Context >
\rst Reserves space to store at least new_cap arguments including new_cap_named* named arguments. \endrst Definition at line 1810 of file core.h. References FMT_ASSERT. Friends And Related Symbol Documentation◆ basic_format_args< Context >
template<typename Context >
Member Data Documentation◆ data_
template<typename Context >
◆ dynamic_args_
template<typename Context >
◆ named_info_
template<typename Context >
|