Skip to content

Better interface for static assert #6676

Closed
@emberian

Description

@emberian

In #6670 I add a basic form of static assertions (as suggested by graydon in #6568), but it's not nice to use. The biggest problem with it is you need a static variable with a name, that goes through trans and ends up in the object file.

@kud1ing suggested static_assert!(), which I think is a nice API but would need some invasive changed to the compiler (I think, uncertain).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions