Update README.md

This commit is contained in:
Gabi Melman
2020-03-22 17:19:11 +02:00
committed by GitHub
parent da3f3da92c
commit cca004efe4

View File

@@ -307,10 +307,8 @@ public:
}; };
void custom_flags_example() void custom_flags_example()
{ {
auto formatter = std::make_unique<spdlog::pattern_formatter>();
using spdlog::details::make_unique; // for pre c++14
auto formatter = make_unique<spdlog::pattern_formatter>();
formatter->add_flag<my_formatter_flag>('*').set_pattern("[%n] [%*] [%^%l%$] %v"); formatter->add_flag<my_formatter_flag>('*').set_pattern("[%n] [%*] [%^%l%$] %v");
spdlog::set_formatter(std::move(formatter)); spdlog::set_formatter(std::move(formatter));
} }