Skip to content

Commit

Permalink
VS14 support: Fix MSVC bug with std::enable_if
Browse files Browse the repository at this point in the history
  • Loading branch information
0blu committed Sep 5, 2024
1 parent 0cc93bd commit 391646d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,10 @@ namespace detail {
template<
typename T,
typename D
// workaround a msvc bug https://developercommunity.visualstudio.com/t/MSVC-1938331290-preview-fails-to-comp/10505565
#if !defined(_MSC_VER) || _MSC_VER != 1938
// workaround for:
// == 19.38-specific msvc bug https://developercommunity.visualstudio.com/t/MSVC-1938331290-preview-fails-to-comp/10505565
// <= 19.23 msvc also appears to fail (but for a different reason https://godbolt.org/z/6Y5EvdWPK)
#if !defined(_MSC_VER) || !(_MSC_VER <= 1923 || _MSC_VER == 1938)
,
typename std::enable_if<
std::is_same<decltype(std::declval<D>()(std::declval<T>())), void>::value,
Expand Down

0 comments on commit 391646d

Please sign in to comment.