Hello all,
Currently, constinit can only apply to static or thread storage duration. I propose it should also be applicable to automatic storage duration.
Furthermore, const member variables of constinit objects will be constant expressions (which would also make getter functions of these members constant).
These changes should be beneficial in ensuring that construction has no runtime overhead, and could potentially also open up new possibilities with non-static constexpr fields.
Any thoughts?
Best Regards,
Franklin Yang