Skip to content

Commit 2ddc5ac

Browse files
committed
Made multiple branches to work around MSVC preprocessor issue
1 parent 3b071a1 commit 2ddc5ac

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

cmake/CompilerFeatureTest.cmake

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@ 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
1515
// MSVC-specific check due to https://developercommunity.visualstudio.com/t/10107077
16-
#if defined(__cpp_explicit_this_parameter) || (defined(__clang__) && __has_extension(cxx_explicit_this_parameter)) || (defined(_MSC_VER) && _MSC_VER >= 1932)
16+
#if defined(__cpp_explicit_this_parameter)
1717
#else
18-
#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
1927
#endif
2028
int main(){}
2129
" HAVE_DEDUCING_THIS )

0 commit comments

Comments
 (0)