Cleanup inline, constexpr & noexcept
We currently apply the constexpr, inline & noexcept modifiers to functions somewhat randomly. This should be reviewed. We should come up with some guidelines and apply them all-around.
See also https://gitlab.maisondelasimulation.fr/gysela-developpers/voicexx/-/issues/68
Concerning constexpr:
-
DiscreteElement -
DiscreteVector -
DiscreteDomain -
ChunkSpan
should be constexpr compatible. Not clear if it useful though.
Concerning inline, because for now DDC is a header-only library, inline is only used to make sure we do not violate the ODR.
Concerning noexcept, I try to follow a general good practice rule so that move constructors, assignment operators and destructors are noexcept.
inline is also useful to increase the inlining probability of a function as its name hints
noexcept should usually be conditional in templates
inline is also useful to increase the inlining probability of a function as its name hints
Not clear to me when one actually wants just an increase of the inlining probability. I usually end up in situations where I explicitly want inlining or I do not care about it.