logger.h: Use utils::catv()
Who knows, clever people are everywhere
Цей коміт міститься в:
11
logger.h
11
logger.h
@@ -2,6 +2,7 @@
|
||||
#define LOGGER_H
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include "utils.h"
|
||||
class Logger
|
||||
{
|
||||
private:
|
||||
@@ -24,7 +25,15 @@ class Logger
|
||||
{
|
||||
(*out) << time(0) << " " << prefix;
|
||||
}
|
||||
(*out) << val;
|
||||
|
||||
if constexpr (std::is_convertible_v<T, std::string_view>)
|
||||
{
|
||||
(*out) << utils::catv(val);
|
||||
}
|
||||
else
|
||||
{
|
||||
(*out) << val;
|
||||
}
|
||||
headerSent = true;
|
||||
return *this; // or maybe out itself? probably not.
|
||||
}
|
||||
|
||||
Посилання в новій задачі
Заблокувати користувача