Skip to content

Commit

Permalink
Add patch to make GoogleTest work with MSVC and C++ 17 (LLNL#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeckingsale authored Jun 17, 2019
1 parent 4ce2658 commit 0b1d779
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,10 @@ inline void PrintTo(absl::string_view sp, ::std::ostream* os) {
}
#endif // GTEST_HAS_ABSL

#if GTEST_LANG_CXX11
inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
#endif // GTEST_LANG_CXX11

#if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_
// Helper function for printing a tuple. T must be instantiated with
// a tuple type.
Expand Down
15 changes: 15 additions & 0 deletions thirdparty_builtin/patches/gtest-2018-02-01-fix-msvc-c++17.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/thirdparty_builtin/googletest-master-2018-02-01/googletest/include/gtest/gtest-printers.h b/thirdparty_builtin/googletest-master-2018-02-01/googletest/include/gtest/gtest-printers.h
index 4deaad0..3073ff1 100755
--- a/thirdparty_builtin/googletest-master-2018-02-01/googletest/include/gtest/gtest-printers.h
+++ b/thirdparty_builtin/googletest-master-2018-02-01/googletest/include/gtest/gtest-printers.h
@@ -634,6 +634,10 @@ inline void PrintTo(absl::string_view sp, ::std::ostream* os) {
}
#endif // GTEST_HAS_ABSL

+#if GTEST_LANG_CXX11
+inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
+#endif // GTEST_LANG_CXX11
+
#if GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_
// Helper function for printing a tuple. T must be instantiated with
// a tuple type.

0 comments on commit 0b1d779

Please sign in to comment.