Version: SMASH-3.1
smash::anonymous_namespace{decaymodes.cc} Namespace Reference

Functions

std::size_t find_offset (PdgCode pdg)
 Passes back the address offset of a particletype in the list of all particles. More...
 

Function Documentation

◆ find_offset()

std::size_t smash::anonymous_namespace{decaymodes.cc}::find_offset ( PdgCode  pdg)
inline

Passes back the address offset of a particletype in the list of all particles.

Parameters
[in]pdgthe pdg code of the sought particle type
Returns
the address offset of this particle type

Definition at line 132 of file decaymodes.cc.

132  {
133  return std::addressof(ParticleType::find(pdg)) -
134  std::addressof(ParticleType::list_all()[0]);
135 }