Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vk_bitflags_wrapped! should support const better #546

Closed
thorjelly opened this issue Jan 7, 2022 · 0 comments · Fixed by #549
Closed

vk_bitflags_wrapped! should support const better #546

thorjelly opened this issue Jan 7, 2022 · 0 comments · Fixed by #549

Comments

@thorjelly
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant