commit 2b746e7: [Minor] Add consteval for fmt wrapper

Vsevolod Stakhov vsevolod at rspamd.com
Sun Jun 19 12:07:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-06-19 12:57:48 +0100
URL: https://github.com/rspamd/rspamd/commit/2b746e782c48cac5d1d8a54f4c065a4ddeb26cb3

[Minor] Add consteval for fmt wrapper

---
 src/client/rspamc.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/client/rspamc.cxx b/src/client/rspamc.cxx
index 1f579c922..6060b621f 100644
--- a/src/client/rspamc.cxx
+++ b/src/client/rspamc.cxx
@@ -346,7 +346,7 @@ struct rspamc_callback_data {
 };
 
 template<typename T>
-static auto emphasis_argument(const T &arg, const char *fmt_string = "{}") -> auto {
+static consteval auto emphasis_argument(const T &arg, const char *fmt_string = "{}") -> auto {
 	if (tty) {
 		return fmt::format(fmt::emphasis::bold, fmt_string, arg);
 	}


More information about the Commits mailing list