Fix log with no arguments
This commit is contained in:
@ -66,12 +66,19 @@ void log_inner(level l, string_view fmt, span<const format_internals::type_erase
|
||||
|
||||
template<formattable... Args>
|
||||
void log(level l, const source_location& sl, string_view fmt, const Args&... args)
|
||||
{
|
||||
if constexpr (sizeof...(Args) == 0)
|
||||
{
|
||||
log_inner(l, fmt, {}, sl);
|
||||
}
|
||||
else
|
||||
{
|
||||
format_internals::type_erased_arg type_erased_args[] = {
|
||||
format_internals::type_erased_arg(args)...
|
||||
};
|
||||
log_inner(l, fmt, type_erased_args, sl);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace asl::log
|
||||
|
||||
|
Reference in New Issue
Block a user