mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 13:19:48 +01:00
Add support for dynamic arg sets
This allows construction of basic_format_args from a dynamic set of arguments. The syntax is a little clunky and could probably be improved but this at least enables the functionality.
This commit is contained in:
committed by
Victor Zverovich
parent
cf2719bd12
commit
b1d10a2884
@@ -1145,6 +1145,16 @@ class basic_format_args {
|
||||
set_data(store.data_);
|
||||
}
|
||||
|
||||
/**
|
||||
\rst
|
||||
Constructs a `basic_format_args` object from a dynamic set of arguments.
|
||||
\endrst
|
||||
*/
|
||||
basic_format_args(const format_arg *args, size_type count)
|
||||
: types_(-(int64_t)count) {
|
||||
set_data(args);
|
||||
}
|
||||
|
||||
/** Returns the argument at specified index. */
|
||||
format_arg get(size_type index) const {
|
||||
format_arg arg = do_get(index);
|
||||
|
||||
Reference in New Issue
Block a user