Skip to content

Commit

Permalink
use msvc _MSVC_LANG not __cplusplus
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Dec 5, 2023
1 parent 37a63de commit 876d8ff
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 876d8ff

Please sign in to comment.