mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Bugfix for fmt::printf on Power9 architecture with the XL compiler (#3256)
This commit is contained in:
parent
676c2a107e
commit
bfc0924eac
@ -218,6 +218,14 @@ template <typename Char> class printf_width_handler {
|
||||
}
|
||||
};
|
||||
|
||||
// Workaround for a bug with the XL compiler when initializing
|
||||
// printf_arg_formatter's base class.
|
||||
template <typename Char>
|
||||
auto make_arg_formatter(buffer_appender<Char> iter, format_specs<Char>& s)
|
||||
-> arg_formatter<Char> {
|
||||
return {iter, s, locale_ref()};
|
||||
}
|
||||
|
||||
// The ``printf`` argument formatter.
|
||||
template <typename OutputIt, typename Char>
|
||||
class printf_arg_formatter : public arg_formatter<Char> {
|
||||
@ -235,7 +243,7 @@ class printf_arg_formatter : public arg_formatter<Char> {
|
||||
|
||||
public:
|
||||
printf_arg_formatter(OutputIt iter, format_specs<Char>& s, context_type& ctx)
|
||||
: base{iter, s, locale_ref()}, context_(ctx) {}
|
||||
: base(make_arg_formatter(iter, s)), context_(ctx) {}
|
||||
|
||||
OutputIt operator()(monostate value) { return base::operator()(value); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user