Skip to content
Snippets Groups Projects
Commit 713fcd52 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'cxx20.GeneratorObjects-20210106' into 'master'

GeneratorObjects: Fix compilation with c++20.

See merge request atlas/athena!39549
parents 503e7a4a 87180c1b
No related branches found
Tags nightly/master/2021-01-08T0354
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef GENERATOROBJECTS_HEPMCPARTICLELINK_H
......@@ -665,6 +665,16 @@ public:
};
/**
* @brief Comparison with GenParticle*.
* Needed with c++20 to break an ambiguity between the built-in GenParticle*
* equality and operator== defined above, arising due to the conversions
* back and forth between HepMcParticleLink and GenParticle*.
*/
bool operator== (const HepMC::GenParticle* a,
const HepMcParticleLink& b);
/**
* @brief Output operator.
* @param os Stream to which to output.
......
/*
* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
* Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
*/
/**
* @file GeneratorObjects/HepMcParticleLink.icc
......@@ -600,3 +600,17 @@ HepMcParticleLink::barcode_type HepMcParticleLink::compress() const
return ( ((m_extBarcode.barcode()&0xFFFF) << 16) |
eventIndex() );
}
/**
* @brief Comparison with GenParticle*.
* Needed with c++20 to break an ambiguity between the built-in GenParticle*
* equality and operator== defined above, arising due to the conversions
* back and forth between HepMcParticleLink and GenParticle*.
*/
inline
bool operator== (const HepMC::GenParticle* a,
const HepMcParticleLink& b)
{
return a == b.cptr();
}
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