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 | 2de4663d385ab54c5d8b8adc68611ad67636f56f (patch) | |
tree | 669c7c55f6b2bf87d85c29d8a016e96cb7655c88 /works/life/computer-network-experiment/Output.h | |
parent | 7a269e185fc59e5f81e7c91e6e75891ba2ca4b3b (diff) | |
download | crupest-2de4663d385ab54c5d8b8adc68611ad67636f56f.tar.gz crupest-2de4663d385ab54c5d8b8adc68611ad67636f56f.tar.bz2 crupest-2de4663d385ab54c5d8b8adc68611ad67636f56f.zip |
import(life): ...
Diffstat (limited to 'works/life/computer-network-experiment/Output.h')
-rw-r--r-- | works/life/computer-network-experiment/Output.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/works/life/computer-network-experiment/Output.h b/works/life/computer-network-experiment/Output.h index 157e5c8..b81dbfd 100644 --- a/works/life/computer-network-experiment/Output.h +++ b/works/life/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)...));
}
|