-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates fmt sprintf patch for XL compiler based on accepted fmt PR
See: fmtlib/fmt#3256
- Loading branch information
1 parent
ac66989
commit 4b5166f
Showing
5 changed files
with
47 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff --git a/src/thirdparty/axom/fmt/printf.h b/src/thirdparty/axom/fmt/printf.h | ||
index 1c6f960a6..7f221d01b 100644 | ||
--- a/src/thirdparty/axom/fmt/printf.h | ||
+++ b/src/thirdparty/axom/fmt/printf.h | ||
@@ -220,6 +220,16 @@ template <typename Char> class printf_width_handler { | ||
} | ||
}; | ||
|
||
+// BEGIN AXOM BUGFIX | ||
+// 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, basic_format_specs<Char>& s) | ||
+ -> arg_formatter<Char> { | ||
+ return {iter, s, locale_ref()}; | ||
+} | ||
+// END AXOM BUGFIX | ||
+ | ||
// The ``printf`` argument formatter. | ||
template <typename OutputIt, typename Char> | ||
class printf_arg_formatter : public arg_formatter<Char> { | ||
@@ -237,8 +247,10 @@ class printf_arg_formatter : public arg_formatter<Char> { | ||
} | ||
|
||
public: | ||
+// BEGIN AXOM BUGFIX | ||
printf_arg_formatter(OutputIt iter, format_specs& s, context_type& ctx) | ||
- : base{iter, s, locale_ref()}, context_(ctx) {} | ||
+ : base(make_arg_formatter(iter, s)), context_(ctx) {} | ||
+// END AXOM BUGFIX | ||
|
||
OutputIt operator()(monostate value) { return base::operator()(value); } | ||
|