Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharless Milette <charles.milette@gmail.com>2021-11-15 22:57:13 +0300
committerCharless Milette <charles.milette@gmail.com>2021-11-15 22:57:13 +0300
commitf6901606f5a36047036072d0c6c58f0c9d90bb9f (patch)
tree1a5b137d8bfc637185406b362df205660cd6eb44 /include/spdlog/stopwatch.h
parent849e90bd017e4b29d2dc691f6a0f33864cabb628 (diff)
Add std::tm formatter, fix spdlog::stopwatch formatter, conditionally use fmt::runtime in test_errors
Diffstat (limited to 'include/spdlog/stopwatch.h')
-rw-r--r--include/spdlog/stopwatch.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/spdlog/stopwatch.h b/include/spdlog/stopwatch.h
index bb976b19..52b4b6ad 100644
--- a/include/spdlog/stopwatch.h
+++ b/include/spdlog/stopwatch.h
@@ -48,7 +48,14 @@ public:
} // namespace spdlog
// Support for fmt formatting (e.g. "{:012.9}" or just "{}")
-namespace fmt {
+namespace
+#ifdef SPDLOG_USE_STD_FORMAT
+ std
+#else
+ fmt
+#endif
+{
+
template<>
struct formatter<spdlog::stopwatch> : formatter<double>
{
@@ -58,4 +65,4 @@ struct formatter<spdlog::stopwatch> : formatter<double>
return formatter<double>::format(sw.elapsed().count(), ctx);
}
};
-} // namespace fmt
+} // namespace fmt/std