diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-13 21:10:58 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-13 21:19:12 +0200 |
| commit | 8c4e17dbec3f443ec9a8dd04729f9503c1f758ad (patch) | |
| tree | 5dd5b1c6ec0436f95e7b29203ed9d1cbcc7e14aa /server/main/settings.hpp | |
| parent | upgrade to <filesystem> (diff) | |
| download | math-server-8c4e17dbec3f443ec9a8dd04729f9503c1f758ad.tar.gz math-server-8c4e17dbec3f443ec9a8dd04729f9503c1f758ad.zip | |
upgrade to std::format
Diffstat (limited to '')
| -rw-r--r-- | server/main/settings.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/main/settings.hpp b/server/main/settings.hpp index b6c5b86..0c40ac3 100644 --- a/server/main/settings.hpp +++ b/server/main/settings.hpp @@ -10,6 +10,7 @@ #include <cstddef> #include <exception> #include <filesystem> +#include <format> #include <iostream> #include <string> #include <thread> @@ -72,7 +73,7 @@ public: } 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; } @@ -88,7 +89,7 @@ private: Settings m_settings; friend std::ostream& operator<<(std::ostream& os, const SettingsParser& parser) { - os << "usage: " << parser.m_prog_name << ' ' << get_short_description() << '\n'; + os << std::format("usage: {} {}\n", parser.m_prog_name, get_short_description()); os << parser.m_visible; return os; } |
