Fix returning buffers from std::visit

Last time I tried it references somehow didn't work.
This commit is contained in:
Robbert van der Helm
2020-03-08 18:40:16 +01:00
parent 2326a92c62
commit d8e39ed16a
2 changed files with 11 additions and 8 deletions
+8 -5
View File
@@ -142,13 +142,16 @@ void Logger::log_event(bool is_dispatch,
<< ", option = " << option << ", data = ";
std::visit(
overload{[&](std::nullptr_t) { message << "<nullptr>"; },
[&](std::string s) { message << "\"" << s << "\""; },
[&](std::array<char, max_string_length>) {
message << "<writeable_buffer>";
}},
overload{
[&](const std::nullptr_t&) { message << "<nullptr>"; },
[&](const std::string& s) { message << "\"" << s << "\""; },
[&](const std::array<char, max_string_length>&) {
message << "<writeable_buffer>";
}},
payload);
message << ")";
log(message.str());
}
}