mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-29 04:30:34 +00:00
Variadic version of BasicFormatter's ctor.
This commit is contained in:
parent
383cc773e2
commit
5789930096
9
format.h
9
format.h
@ -36,6 +36,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <initializer_list>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
@ -994,6 +995,14 @@ class BasicFormatter {
|
||||
BasicFormatter(BasicWriter<Char> &w, const Char *format = 0)
|
||||
: writer_(&w), format_(format) {}
|
||||
|
||||
// Constructs a formatter with formatting arguments.
|
||||
BasicFormatter(BasicWriter<Char> &w,
|
||||
const Char *format, std::initializer_list<Arg> args)
|
||||
: writer_(&w), format_(format) {
|
||||
for (const Arg &arg: args)
|
||||
Add(arg);
|
||||
}
|
||||
|
||||
// Perfoms formatting if the format string is non-null. The format string
|
||||
// can be null if its ownership has been transferred to another formatter.
|
||||
~BasicFormatter() {
|
||||
|
Loading…
Reference in New Issue
Block a user