Apply XL compiler bugfix within printf_arg_formatter constructor

This commit is contained in:
Kenneth Weiss 2023-01-09 12:35:05 -08:00
parent af9a54ac93
commit e4645d2867

View File

@ -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); }