From 17a5c808dad4bcf3a412c005314cad43609ae6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20R=C3=BCth?= Date: Tue, 4 Jan 2022 12:53:44 -0600 Subject: [PATCH] Restore FMT_API on error_handler::on_error() (#2696) this fixes a breaking ABI change that was introduce in the upgrade from 8.0.1 to 8.1.0. Fixes #2695. --- include/fmt/core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 4efa21f1..28b8ff64 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -615,7 +615,8 @@ struct error_handler { constexpr error_handler(const error_handler&) = default; // This function is intentionally not constexpr to give a compile-time error. - void on_error(const char* message) { throw_format_error(message); } + // This function is marked as FMT_API for backwards compatibility, see #2695. + FMT_NORETURN FMT_API void on_error(const char* message) { throw_format_error(message); } }; FMT_END_DETAIL_NAMESPACE