Is there a place in system/basic_types.nim for a bitwise or of an enum? A user can write the helper but should it already be there?
template `or`(a, b: enum): typeof(a) =
## Bitwise `or` of enum types
## Returns the value as the first enum type.
when typeof(a) isnot typeof(b):
{.warning: "Bitwise `or` is unsafe for different enum types".}
typeof(a)(ord(a) or ord(b))
No place. Fair enough.
Most wrappers I see map C enums to HolyEnums and I feel like I have to jump through hoops to send a bit flag back.
Ill think on your suggestions.