diff options
| author | 2024-04-12 02:08:35 -0700 | |
|---|---|---|
| committer | 2024-04-12 20:50:35 +0000 | |
| commit | 1b5d0be1253261091f4e036f41155e784ba69c83 (patch) | |
| tree | e6aa6f25c7f10b5cb52f8b62a1420615a81a3660 /compiler/optimizing/code_generator.h | |
| parent | b66eb3bc8793fdde9675742f3d7851422963adfb (diff) | |
Fix NameAndSignature::operator== ambiguity
Be consistent with other places in the file and define both operator==
and operator!=. Both should be const methods.
art/openjdkjvmti/ti_redefine.cc:964:32: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'MethodNameAndSignature' (aka 'NameAndSignature<art::ArtMethod>') and 'MethodNameAndSignature') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator]
964 | return old_method_id == new_method_id;
| ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
art/openjdkjvmti/ti_redefine.cc:882:8: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
882 | bool operator==(const NameAndSignature<T>& o) {
| ^
art/openjdkjvmti/ti_redefine.cc:882:8: note: mark 'operator==' as const or add a matching 'operator!=' to resolve the ambiguity
Bug: 311052584
Test: remove cpp_std override and build Android
Change-Id: I3fc4ab14b0a3ccfc2d58bdbd7442e87b478b705d
Diffstat (limited to 'compiler/optimizing/code_generator.h')
0 files changed, 0 insertions, 0 deletions