use std::function signature in argument?
This commit is contained in:
@@ -76,7 +76,7 @@ namespace jlog
|
||||
/// These are helper functions designed to be wrapped around for easier custom logger building.
|
||||
/// @note This file is implemented differently per-platform to handle differences in console color handling.
|
||||
/// @see windows/jlog.cpp linux/jlog.cpp
|
||||
std::string toks2msg(std::vector<token> tokens, std::string (*formatter)(token));
|
||||
std::string toks2msg(std::vector<token> tokens, std::function<std::string(token)> formatter);
|
||||
std::string consoleMsgFormatter(token t);
|
||||
std::string logfileMsgFormatter(token t);
|
||||
std::string toks2consoleMsg(std::vector<token> tokens);
|
||||
|
@@ -55,7 +55,7 @@ namespace jlog
|
||||
stream << message;
|
||||
}
|
||||
|
||||
std::string toks2msg(std::vector<token> tokens, std::string (*formatter)(token))
|
||||
std::string toks2msg(std::vector<token> tokens, std::function<std::string(token)> formatter)
|
||||
{
|
||||
std::string msg;
|
||||
for (token t: tokens)
|
||||
|
Reference in New Issue
Block a user