Skip to content

Commit

Permalink
Merge pull request #26 from camio/add-msvc-specific-deducing-this-check
Browse files Browse the repository at this point in the history
Add MSVC-specific deducing-this check
  • Loading branch information
camio authored Nov 13, 2024
2 parents 7369d10 + 8da168e commit fed466b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmake/CompilerFeatureTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit fed466b

Please sign in to comment.