-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compilation of ginkgo 1.7.0 with msvc & C++20
- Loading branch information
Showing
6 changed files
with
22 additions
and
4 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,14 @@ | ||
diff --git a/include/ginkgo/core/base/std_extensions.hpp b/include/ginkgo/core/base/std_extensions.hpp | ||
index 1064ae464..d9966c058 100644 | ||
--- a/include/ginkgo/core/base/std_extensions.hpp | ||
+++ b/include/ginkgo/core/base/std_extensions.hpp | ||
@@ -73,7 +73,8 @@ using void_t = typename detail::make_void<Ts...>::type; | ||
// Disable deprecation warnings when using standard > C++14 | ||
inline bool uncaught_exception() noexcept | ||
{ | ||
-#if __cplusplus > 201402L | ||
+// MSVC uses _MSVC_LANG as __cplusplus | ||
+#if (defined(_MSVC_LANG) && _MSVC_LANG > 201402L) || __cplusplus > 201402L | ||
return std::uncaught_exceptions() > 0; | ||
#else | ||
return std::uncaught_exception(); |