Skip to content

Commit 3b071a1

Browse files
committed
Add MSVC-specific deducing-this check
This compiler, like clang, doesn't properly advertise deducing this support. I really don't know the point of these feature test macros if we have to work around them not being used for almost every compiler. :(
1 parent 7369d10 commit 3b071a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/CompilerFeatureTest.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ 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) || (defined(__clang__) && __has_extension(cxx_explicit_this_parameter)) || (defined(_MSC_VER) && _MSC_VER >= 1932)
1617
#else
1718
#error No deducing this support
1819
#endif

0 commit comments

Comments
 (0)