The answer to this question from @Vittorio Romeo explains constinit
very well. In his answer, the following is mentioned:
constexpr
is not equivalent toconst constinit
, as the former mandates constant destruction, while the latter doesn't.
Although pretty clear, I fail to see any practical use of this. In which case would const constinit
be used, but constexpr
could not. In any case that I can think of, for any type T
that can be constinit
and cannot be changed during runtime via const
, constant destruction should be a trivial restriction to add. Am I missing something?