Skip to content

vk_bitflags_wrapped! should support const better #546

Closed
@thorjelly

Description

@thorjelly

is_empty, intersects, and contains should all be const fn. Additionally, it would be very nice if there were intersection, union, difference const fn methods because bitwise operators do not work in const contexts except on stock integers. This is similar to how bitflags works: https://docs.rs/bitflags/1.3.2/bitflags/example_generated/struct.Flags.html

This would allow static validation directly on the bitflag types, as I am starting to do, to be a lot more convenient since they wouldn't need to be converted to/from raw to do any operations on them in a const context.

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