Skip to content

Commit

Permalink
Apply XL compiler bugfix within printf_arg_formatter constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyweiss committed Jan 11, 2023
1 parent d985bc9 commit f736c01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/fmt/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ class printf_arg_formatter : public arg_formatter<Char> {

public:
printf_arg_formatter(OutputIt iter, format_specs<Char>* s, context_type& ctx)
: base{iter, s}, context_(ctx) {}
: base{iter, s, locale_ref()}, context_(ctx) {
#if defined(__ibmxl__)
// Bugfix: XL compiler optimizes out initializer for base
this->out = iter;
this->specs = s;
#endif
}

OutputIt operator()(monostate value) { return base::operator()(value); }

Expand Down

0 comments on commit f736c01

Please sign in to comment.