Skip to content

Commit fed466b

Browse files
authored
Merge pull request #26 from camio/add-msvc-specific-deducing-this-check
Add MSVC-specific deducing-this check
2 parents 7369d10 + 8da168e commit fed466b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

cmake/CompilerFeatureTest.cmake

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@ include(CheckCXXSourceCompiles)
1212
function(beman_iterator_check_deducing_this result_var)
1313
check_cxx_source_compiles( "
1414
// clang-specific check due to http://github.com/llvm/llvm-project/issues/113174
15-
#if defined(__cpp_explicit_this_parameter) || (defined(__clang__) && __has_extension(cxx_explicit_this_parameter))
15+
// MSVC-specific check due to https://developercommunity.visualstudio.com/t/10107077
16+
#if defined(__cpp_explicit_this_parameter)
1617
#else
17-
#error No deducing this support
18+
#if defined(_MSC_VER) && (_MSC_VER >= 1932)
19+
#elif defined(__clang__)
20+
#if __has_extension(cxx_explicit_this_parameter)
21+
#else
22+
#error No deducing this support
23+
#endif
24+
#else
25+
#error No deducing this support
26+
#endif
1827
#endif
1928
int main(){}
2029
" HAVE_DEDUCING_THIS )

0 commit comments

Comments
 (0)