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)'
```
This commit is contained in:
Saleem Abdulrasool
2019-12-12 21:14:25 -08:00
parent bb1052ca3e
commit dedde46df3

View File

@@ -169,7 +169,8 @@ template <> struct DenseMapInfo<AutoDiffDerivativeFunctionKind> {
static bool isEqual(const AutoDiffDerivativeFunctionKind &LHS,
const AutoDiffDerivativeFunctionKind &RHS) {
return LHS == RHS;
return static_cast<AutoDiffDerivativeFunctionKind::innerty>(LHS) ==
static_cast<AutoDiffDerivativeFunctionKind::innerty>(RHS);
}
};