log: use forwarding references for format parameters
This commit is contained in:
parent
08d8eb942d
commit
c7fe53f430
11
log.hpp
11
log.hpp
@ -82,9 +82,16 @@ namespace util {
|
||||
|
||||
template <typename ...Args, size_t N>
|
||||
void
|
||||
log (level_t l, const char (&fmt)[N], const Args&...args)
|
||||
log (level_t l, const char (&fmt)[N], Args &&...args)
|
||||
{
|
||||
log (l, to_string (format::printf (fmt) (args...)));
|
||||
log (
|
||||
l,
|
||||
to_string (
|
||||
format::printf (fmt) (
|
||||
std::forward<Args> (args)...
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user