Skip to content

Commit

Permalink
Restore FMT_API on error_handler::on_error()
Browse files Browse the repository at this point in the history
this fixes a breaking ABI change that was introduce in the upgrade from
8.0.1 to 8.1.0.

Fixes fmtlib#2695.
  • Loading branch information
saraedum committed Jan 4, 2022
1 parent 64dc8fb commit 5a05cb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,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

Expand Down

0 comments on commit 5a05cb9

Please sign in to comment.