diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-06 00:20:41 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-06 00:21:07 +0200 |
| commit | faf49e9485927985ee6ecff24eaf285fbab4b218 (patch) | |
| tree | 3eea908424c8a922051719f0e6874d94d4bacf44 /utils/command_line.hpp | |
| parent | upgrade to std::filesystem (diff) | |
| download | winapi-debug-faf49e9485927985ee6ecff24eaf285fbab4b218.tar.gz winapi-debug-faf49e9485927985ee6ecff24eaf285fbab4b218.zip | |
minor fixes
Diffstat (limited to 'utils/command_line.hpp')
| -rw-r--r-- | utils/command_line.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/command_line.hpp b/utils/command_line.hpp index 8f4b949..ebed79e 100644 --- a/utils/command_line.hpp +++ b/utils/command_line.hpp @@ -9,6 +9,7 @@ #include <exception> #include <filesystem> +#include <format> #include <iostream> #include <ostream> #include <string> @@ -43,7 +44,7 @@ public: void usage() const { std::cout << *this; } void usage_error(const std::exception& e) const { - std::cerr << "usage error: " << e.what() << '\n'; + std::cerr << std::format("usage error: {}\n", e.what()); std::cerr << *this; } @@ -61,7 +62,7 @@ private: friend std::ostream& operator<<(std::ostream& os, const SettingsParser& parser) { const auto short_descr = parser.get_short_description(); - os << "usage: " << parser.prog_name << ' ' << short_descr << '\n'; + os << std::format("usage: {} {}\n", parser.prog_name, short_descr); os << parser.visible; return os; } |
