Move bool operator>(l1t::Jet&, l1t::Jet&) to l1t namespace #6582
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following line in
BitonicSort.h
depends on template argument type. Thus argument-dependent lookup (ADL)
is being used here to find
bool operator>(l1t::Jet&, l1t::Jet&)
.ADL is done once all argument types are known, i.e., in template
instantiation location. It this case it happens in a few places from
BitonicSort.h
andStage2Layer2JetAlgorithmFirmwareImp1.cc
.They all require template specialization:
BitonicSort<l1t::Jet>
.The operator is not found on the first look up (unqualified lookup),
because it's delcared after template delcaration. It's also not found in
second look up (ADL), because it's not in a class's namespace, but in a
global namespace.
The patch adds
bool operator>(l1t::Jet&, l1t::Jet&)
tol1t
namespaceto allow ADL to find the operator.
Resolves error with Clang.
Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch