mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user