Skip to content

GSF: clang issue with constexpr involving sqrt

clang complains

constexpr double invsqrt2PI = 1. / sqrt(2. * M_PI);
                 ^            ~~~~~~~~~~~~~~~~~~~~
/build/atnight/localbuilds/nightlies/master/athena/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx:18:36: note: non-constexpr function 'sqrt' cannot be used in a constant expression
constexpr double invsqrt2PI = 1. / sqrt(2. * M_PI);
                                   ^
/usr/include/bits/mathcalls.h:157:13: note: declared here
__MATHCALL (sqrt,, (_Mdouble_ __x));

mentiong also @ssnyder

Merge request reports

Loading