-
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.
Merge pull request #1009 from LLNL/bugfix/kweiss/odds-and-ends
Fixes several outstanding bugs
- Loading branch information
Showing
12 changed files
with
136 additions
and
55 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/src/thirdparty/axom/fmt/format-inl.h b/src/thirdparty/axom/fmt/format-inl.h | ||
index ff6e6323f..efdbeb40a 100644 | ||
--- a/src/thirdparty/axom/fmt/format-inl.h | ||
+++ b/src/thirdparty/axom/fmt/format-inl.h | ||
@@ -121,11 +121,17 @@ template <typename Char> AXOM_FMT_FUNC Char decimal_point_impl(locale_ref) { | ||
AXOM_FMT_API AXOM_FMT_FUNC format_error::~format_error() noexcept = default; | ||
#endif | ||
|
||
-AXOM_FMT_FUNC std::system_error vsystem_error(int error_code, string_view format_str, | ||
+// BEGIN AXOM BUGFIX | ||
+// NVCC's preprocessor converts 'std::error_code' to `class std::error_code' | ||
+// and then complains that `return class std::error_code' isn't valid! | ||
+using axom_fmt_system_error = std::system_error; | ||
+ | ||
+AXOM_FMT_FUNC axom_fmt_system_error vsystem_error(int error_code, string_view format_str, | ||
format_args args) { | ||
auto ec = std::error_code(error_code, std::generic_category()); | ||
- return std::system_error(ec, vformat(format_str, args)); | ||
+ return axom_fmt_system_error(ec, vformat(format_str, args)); | ||
} | ||
+// END AXOM BUGFIX | ||
|
||
namespace detail { | ||
|
||
@@ -1449,16 +1455,18 @@ AXOM_FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { | ||
buffer_.push_back(0); | ||
} | ||
|
||
+// BEGIN AXOM BUGFIX | ||
AXOM_FMT_FUNC void format_system_error(detail::buffer<char>& out, int error_code, | ||
const char* message) noexcept { | ||
AXOM_FMT_TRY { | ||
auto ec = std::error_code(error_code, std::generic_category()); | ||
- write(std::back_inserter(out), std::system_error(ec, message).what()); | ||
+ write(std::back_inserter(out), axom_fmt_system_error(ec, message).what()); | ||
return; | ||
} | ||
AXOM_FMT_CATCH(...) {} | ||
format_error_code(out, error_code, message); | ||
} | ||
+// END AXOM BUGFIX | ||
|
||
AXOM_FMT_FUNC void report_system_error(int error_code, | ||
const char* message) noexcept { |
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); } | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ | |
|
||
#include "gtest/gtest.h" | ||
|
||
// Note: The following line generates an error with nvcc on [email protected] | ||
// Axom has a patch to workaround this error. | ||
using namespace std; | ||
|
||
//----------------------------------------------------------------------------- | ||
TEST(fmt_smoke, basic_use) | ||
{ | ||
|