22 case (energy_units::eV):
24 case (energy_units::keV):
26 case (energy_units::MeV):
28 case (energy_units::GeV):
30 case (energy_units::TeV):
32 case (energy_units::PeV):
34 case (energy_units::unknown):
40 "Attempt to compute a scale factor of an unknown unit: \""} +
41 energy_units_properties::to_string(u) +
'"')
Exceptions that can be thrown when running the functions of the package.
auto scale_factor_for(energy_units u)
Compute the scale factor for the given unit.
Definition: units.hpp:20
Raised when unexpected problems appear, which should be reported as bugs.
Definition: exceptions.hpp:38
static constexpr auto scale_factor(energy_units u)
Determine the scale factor from a reference.
Definition: units.hpp:48
Use the template argument as a reference to determine scale factors.
Definition: units.hpp:46
Contains macros to define smart enumeration types.
Main namespace of the Reactions package.
Definition: all.hpp:21
REACTIONS_POW_ENUM_WITH_UNKNOWN(energy_units, eV, keV, MeV, GeV, TeV, PeV)
Energy units.
Represent the abscence of units.
Definition: units.hpp:17