summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
author Ryan Prichard <rprichard@google.com> 2024-04-12 02:08:35 -0700
committer Ryan Prichard <rprichard@google.com> 2024-04-12 20:50:35 +0000
commit1b5d0be1253261091f4e036f41155e784ba69c83 (patch)
treee6aa6f25c7f10b5cb52f8b62a1420615a81a3660 /compiler/optimizing/code_generator.h
parentb66eb3bc8793fdde9675742f3d7851422963adfb (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