From 3a18e4d4ac8d3f11e9fa89649f43eef2dacd4438 Mon Sep 17 00:00:00 2001 From: powerof3 Date: Fri, 27 Sep 2024 00:56:04 +0530 Subject: [PATCH] add fmt::format specialization for REL::Version --- include/REL/Version.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/REL/Version.h b/include/REL/Version.h index c5b396812..63aba38ff 100644 --- a/include/REL/Version.h +++ b/include/REL/Version.h @@ -99,3 +99,15 @@ struct std::formatter : formatter } }; #endif + +#ifdef FMT_VERSION +template +struct fmt::formatter : formatter +{ + template + auto format(const REL::Version a_version, FormatContext& a_ctx) const + { + return formatter::format(a_version.string(), a_ctx); + } +}; +#endif