You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although in an older issue, it was concluded that general constexpr may be difficult to achieve, I believe there would be considerable benefit in just a constexpr default constructor for the container types and the hooks. Since C++20, we have the constinit specifier for global variables, which means the global can be initialised without running code, which is desirable especially in bare-metal/kernel scenarios, where there is little one can rely on during early boot. However, constinit requires a constexpr constructor, for obvious reasons. Global containers in bare-metal scenarios usually start-off empty, so a default constructor that is constexpr would already go a long way.
The text was updated successfully, but these errors were encountered:
Although in an older issue, it was concluded that general
constexpr
may be difficult to achieve, I believe there would be considerable benefit in just aconstexpr
default constructor for the container types and the hooks. Since C++20, we have theconstinit
specifier for global variables, which means the global can be initialised without running code, which is desirable especially in bare-metal/kernel scenarios, where there is little one can rely on during early boot. However,constinit
requires aconstexpr
constructor, for obvious reasons. Global containers in bare-metal scenarios usually start-off empty, so a default constructor that isconstexpr
would already go a long way.The text was updated successfully, but these errors were encountered: