Skip to content

Commit

Permalink
Made multiple branches to work around MSVC preprocessor issue
Browse files Browse the repository at this point in the history
  • Loading branch information
camio committed Nov 13, 2024
1 parent 3b071a1 commit 2ddc5ac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmake/CompilerFeatureTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ 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
// MSVC-specific check due to https://developercommunity.visualstudio.com/t/10107077
#if defined(__cpp_explicit_this_parameter) || (defined(__clang__) && __has_extension(cxx_explicit_this_parameter)) || (defined(_MSC_VER) && _MSC_VER >= 1932)
#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 )
Expand Down

0 comments on commit 2ddc5ac

Please sign in to comment.