Skip to content

Commit dedde46

Browse files
committed
AST: explicitly indicate operator==
This is needed to build with VS2019: ``` swift\include\swift\AST\AutoDiff.h(172): error C2593: 'operator ==' is ambiguous swift\include\swift\Basic\AnyValue.h(129): note: could be 'bool swift::operator ==(const swift::AnyValue &,const swift::AnyValue &)' [found using argument-dependent lookup] swift\include\swift\AST\AutoDiff.h(172): note: or 'built-in C++ operator==(swift::AutoDiffDerivativeFunctionKind::innerty, swift::AutoDiffDerivativeFunctionKind::innerty)' swift\include\swift\AST\AutoDiff.h(172): note: while trying to match the argument list '(const swift::AutoDiffDerivativeFunctionKind, const swift::AutoDiffDerivativeFunctionKind)' ```
1 parent bb1052c commit dedde46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/swift/AST/AutoDiff.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ template <> struct DenseMapInfo<AutoDiffDerivativeFunctionKind> {
169169

170170
static bool isEqual(const AutoDiffDerivativeFunctionKind &LHS,
171171
const AutoDiffDerivativeFunctionKind &RHS) {
172-
return LHS == RHS;
172+
return static_cast<AutoDiffDerivativeFunctionKind::innerty>(LHS) ==
173+
static_cast<AutoDiffDerivativeFunctionKind::innerty>(RHS);
173174
}
174175
};
175176

0 commit comments

Comments
 (0)