Hacker News new | ask | show | jobs
by TuxSH 338 days ago
You use constinit. But this means constexpr constructor (easy with 2-phase init, not too much of a problem for singleton objects), and trivial destruction
1 comments

Does that guarantee that the static object is constructed before the first execution of the block?
Yes, it will be constructed at compile time. Not everything can be constinit.