Skip to content

Feature: constexpr default constructor #85

@burnpanck

Description

@burnpanck

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions