Roboruka
Knihovna pro obsluhu RoboRuky.
Veřejné metody | Přátelé třídy | Seznam všech členů
Dokumentace šablony třídy dynamic_format_arg_store< Context >

#include <core.h>

Veřejné metody

template<typename T >
void push_back (const T &arg)
 
template<typename T >
void push_back (std::reference_wrapper< T > arg)
 

Přátelé třídy

class basic_format_args< Context >
 

Detailní popis

template<typename Context>
class dynamic_format_arg_store< Context >

\rst A dynamic version of fmt::format_arg_store<>. It's equipped with a storage to potentially temporary objects which lifetime could be shorter than the format arguments object.

It can be implicitly converted into ~fmtbasic_format_args for passing into type-erased formatting functions such as ~fmt::vformat. \endrst

Dokumentace k metodám

◆ push_back() [1/2]

template<typename Context >
template<typename T >
void dynamic_format_arg_store< Context >::push_back ( const T &  arg)
inline

\rst Adds an argument into the dynamic store for later passing to a formating function.

Note that custom types and string types (but not string views!) are copied into the store with dynamic memory (in addition to resizing vector).

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

◆ push_back() [2/2]

template<typename Context >
template<typename T >
void dynamic_format_arg_store< Context >::push_back ( std::reference_wrapper< T >  arg)
inline

Adds a reference to the argument into the dynamic store for later passing to a formating function.


Dokumentace pro tuto třídu byla vygenerována z následujícího souboru: