diff options
author | crupest <crupest@outlook.com> | 2021-06-06 23:51:32 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-06 23:51:32 +0800 |
commit | 7f2badbf713d37a75df03c1e0704ddab6af06627 (patch) | |
tree | b90139171a313d4de662e3cb51e1ede26804787f /computer-network-experiment/Output.h | |
parent | 800923717d1f95cd16b270ad8f1e430f77f33f57 (diff) | |
download | life-7f2badbf713d37a75df03c1e0704ddab6af06627.tar.gz life-7f2badbf713d37a75df03c1e0704ddab6af06627.tar.bz2 life-7f2badbf713d37a75df03c1e0704ddab6af06627.zip |
...
Diffstat (limited to 'computer-network-experiment/Output.h')
-rw-r--r-- | computer-network-experiment/Output.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/computer-network-experiment/Output.h b/computer-network-experiment/Output.h index 157e5c8..b81dbfd 100644 --- a/computer-network-experiment/Output.h +++ b/computer-network-experiment/Output.h @@ -29,10 +29,9 @@ inline void SendOutput(Output output) { output_queue.blockingWrite(std::move(output));
}
-inline void SendOutput(String output) { SendOutput(std::move(output)); }
+inline void SendOutput(String output) { SendOutput(Output{std::move(output)}); }
-template <typename... Args>
-void SendOutput(StringView format, Args &&...args) {
+template <typename... Args> void SendOutput(StringView format, Args &&...args) {
output_queue.blockingWrite(fmt::format(format, std::forward<Args>(args)...));
}
|