Skip to content

Commit

Permalink
Restore ABI compatibility with 11.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Dec 26, 2024
1 parent 853df39 commit 3e04222
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -2604,10 +2604,11 @@ template <typename Context> class basic_format_args {
};

// A formatting context.
class context : private detail::locale_ref {
class context {
private:
appender out_;
format_args args_;
detail::locale_ref loc_; // DEPRECATED! Should be replaced with a base class.

public:
/// The character type for the output.
Expand All @@ -2623,7 +2624,7 @@ class context : private detail::locale_ref {
/// in the object so make sure they have appropriate lifetimes.
FMT_CONSTEXPR context(iterator out, format_args args,
detail::locale_ref loc = {})
: locale_ref(loc), out_(out), args_(args) {}
: out_(out), args_(args), loc_(loc) {}
context(context&&) = default;
context(const context&) = delete;
void operator=(const context&) = delete;
Expand All @@ -2642,7 +2643,7 @@ class context : private detail::locale_ref {
// Advances the begin iterator to `it`.
FMT_CONSTEXPR void advance_to(iterator) {}

FMT_CONSTEXPR auto locale() const -> detail::locale_ref { return *this; }
FMT_CONSTEXPR auto locale() const -> detail::locale_ref { return loc_; }
};

template <typename Char = char> struct runtime_format_string {
Expand Down

0 comments on commit 3e04222

Please sign in to comment.