Closed Iximiel closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
9c3246e
) 84.08% compared to head (72b139d
) 84.08%. Report is 9 commits behind head on master.:exclamation: Current head 72b139d differs from pull request most recent head 03074ed. Consider uploading reports for the commit 03074ed to get more accurate results
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
I encoundered a case i which the
if (!(test)) plumed_error() << PLMD::Exception::Assertion(#test)
, the plumed_dbg_massert macro expansion with NDEBUG, is not optimized away, and this patch is the least invasive thing to do:if constexpr(false)
is guaranteed to be evaluated at compile time, so that the rest of the line is ignored.I think helps in improving the code optimization after inlining a function, at least that is what I think it happened in my case
Target release
I would like my code to appear in release 2.10/2.9 (this is a single commit, it can be easily rebased on the 2.9)
Type of contribution
Copyright
COPYRIGHT
file with the correct license information. Code should be released under an open source license. I also used the commandcd src && ./header.sh mymodulename
in order to make sure the headers of the module are correct.Tests