AthenaKernel: Fix Units for clang.
The Units header provides units objects for which division is automatically changed at compile-time to multiplication by a reciprocal of the unit constant. This relied on the compiler changing (1./x) to multiplication by a reciprocal, if x is constant. However, this does not work with clang if the -ffp-exception-behavior=maytrap option is used. Rewrite to fix this. The price is that we need to have a separate class for each unit (which can then return the value as a constexpr).
Please register or sign in to comment