Skip to content

Commit 37db587

Browse files
authored
Merge pull request #26111 from compnerd/complexity-is-key
AST: add a workaround for VS2017
2 parents dc5915c + 9abc323 commit 37db587

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/swift/AST/SimpleRequest.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ namespace detail {
113113

114114
/// Extract the first, nearest source location from a tuple.
115115
template<unsigned Index, typename ...Types,
116-
typename = typename std::enable_if<Index < sizeof...(Types)>::type>
116+
typename = typename std::enable_if<sizeof...(Types) - Index
117+
? true
118+
: false>::type>
117119
SourceLoc extractNearestSourceLocTuple(const std::tuple<Types...> &value) {
118120
SourceLoc loc = maybeExtractNearestSourceLoc(std::get<Index>(value));
119121
if (loc.isValid())

0 commit comments

Comments
 (0)