diff --git a/cmake/CompilerFeatureTest.cmake b/cmake/CompilerFeatureTest.cmake index df9b294..99bc65d 100644 --- a/cmake/CompilerFeatureTest.cmake +++ b/cmake/CompilerFeatureTest.cmake @@ -12,9 +12,18 @@ include(CheckCXXSourceCompiles) function(beman_iterator_check_deducing_this result_var) check_cxx_source_compiles( " // clang-specific check due to http://github.com/llvm/llvm-project/issues/113174 -#if defined(__cpp_explicit_this_parameter) || (defined(__clang__) && __has_extension(cxx_explicit_this_parameter)) +// MSVC-specific check due to https://developercommunity.visualstudio.com/t/10107077 +#if defined(__cpp_explicit_this_parameter) #else -#error No deducing this support + #if defined(_MSC_VER) && (_MSC_VER >= 1932) + #elif defined(__clang__) + #if __has_extension(cxx_explicit_this_parameter) + #else + #error No deducing this support + #endif + #else + #error No deducing this support + #endif #endif int main(){} " HAVE_DEDUCING_THIS )