Skip to content
Snippets Groups Projects
Commit 87180c1b authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment