What\'s wrong with this code?
enum LogLevel {
LogLevel_Error = 1,
LogLevel_Warning = 2,
LogLevel_Info = 3,
LogLevel_Debug = 4
};
LogLevel GetLog
You probably need
Write(level, ss, rest...);
// ^^^ Note these dots!
I see the following issues:
rest
needs to be expanded:
Write(level, ss, rest...);
Write
is supposed to take a log level as its first argument:
Write(GetLogLevel(), std::stringstream(), "Hello", (const char*)" World!", 1);
You can't pass a temporary std::stringstream
to an lvalue reference:
std::stringstream ss;
Write(GetLogLevel(), ss, "Hello", (const char*)" World!", 1);