GeneratorObjects: Fix compilation with c++20.
With c++20, GenParticle*==HepMcParticleLink was ambiguous. - The second argument could convert to GenParticle* and then compare using the built-in == operation. - The first argument could convert to HepMcParticleLink and the compare using HepMcParticleLink::operator==. The second of these is only allowed in c++20 due to the fact that operator== is implicitly reversable (otherwise, we wouldn't be able to convert the first argument as this is a member function). Add an explicit operator== for this case to disambiguate (choosing the first alternative).
parent
1b08b314
Showing
- Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h 11 additions, 1 deletion...ors/GeneratorObjects/GeneratorObjects/HepMcParticleLink.h
- Generators/GeneratorObjects/GeneratorObjects/HepMcParticleLink.icc 15 additions, 1 deletion...s/GeneratorObjects/GeneratorObjects/HepMcParticleLink.icc
Please register or sign in to comment