Hacker News new | ask | show | jobs
by rocqua 2761 days ago
Regarding the advice on globals, and the comments here regarding destructors, how does `constexpr` interact with RAII?

Are `constexpr` values destructed when they go out of scope? Or is it simply not possible to `constexpr` them?

1 comments

constexpr variables must have a literal type, which requires a trivial destructor.