diff --git a/Phys/ParticleCombiners/include/CombKernel/ParticleCombiner.h b/Phys/ParticleCombiners/include/CombKernel/ParticleCombiner.h index 043b95a2686cb0f2cb618794fee5f780560867fc..b883072e2cf5ef066c94b6133050574b3afdc3db 100644 --- a/Phys/ParticleCombiners/include/CombKernel/ParticleCombiner.h +++ b/Phys/ParticleCombiners/include/CombKernel/ParticleCombiner.h @@ -536,14 +536,7 @@ private: if ( decay.children()[IInput].pid() == decay.children()[IInput - 1].pid() ) { // Yes, in this case we should insist that the `IInput`th and // `IInput-1`th inputs were, in fact, the same... - // FIXME(AP): we cannot compare containers because the inputs are Range - // objects which get instantiated when this algorithm's operator() is - // called; the same underlying container passed in N times will result - // in N Range objects with different memory addresses. Instead we use - // the memory address of the first element of the container; this is - // very shaky and we could come up with a better definition of - // 'identical containers' - if ( UNLIKELY( *( std::get<IInput>( inputs ).begin() ) != *( std::get<IInput - 1>( inputs ).begin() ) ) ) { + if ( UNLIKELY( !( std::get<IInput>( inputs ) == std::get<IInput - 1>( inputs ) ) ) ) { throw GaudiException{"Got contiguous children with the same PIDs, but the corresponding algorithm inputs " "were not the same. This is unsupported.", "NBodyCombiner<name>", StatusCode::FAILURE};