Skip to content

Commit

Permalink
Merge fix MSVC __cplusplus by _MSVC_LANG
Browse files Browse the repository at this point in the history
This PR fixes MSVC `__cplusplus` by `_MSVC_LANG`

Related PR: #1496
  • Loading branch information
yhmtsai authored Dec 6, 2023
2 parents 37a63de + 876d8ff commit 457ed4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ginkgo/core/base/std_extensions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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();
Expand Down

0 comments on commit 457ed4c

Please sign in to comment.