Skip to content

Commit 354eb4d

Browse files
authored
Merge pull request #26132 from compnerd/legibility-requirements
AST: attempt to rewrite the expression to be more legible
2 parents a030e61 + 2c5d880 commit 354eb4d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/swift/AST/SimpleRequest.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ 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<sizeof...(Types) - Index
117-
? true
118-
: false>::type>
116+
typename = typename std::enable_if<(Index < sizeof...(Types))>::type>
119117
SourceLoc extractNearestSourceLocTuple(const std::tuple<Types...> &value) {
120118
SourceLoc loc = maybeExtractNearestSourceLoc(std::get<Index>(value));
121119
if (loc.isValid())

0 commit comments

Comments
 (0)