digitalmars.D - wanna bitflags support
- Katayama Hirofumi MZ (12/12) Feb 09 2014 bitflags WINSTYLEBITFLAGS : uint
- bearophile (5/6) Feb 09 2014 I think the D language is probably able to implement something
- Katayama Hirofumi MZ (1/1) Feb 09 2014 There is no bitfield support in dlang. Could you show any example?
- Jakob Ovrum (3/5) Feb 09 2014 std.bitmanip.bitfields should be able to do it.
bitflags WINSTYLEBITFLAGS : uint { WS_VISIBLE = 1, WS_CHILD = 2, ... } bool CreateWindow(WINSTYLEBITFLAGS styles); static assert(typeid(WS_VISIBLE) == typeid(WINSTYLEBITFLAGS)); static assert(typeid(WS_CHILD) == typeid(WINSTYLEBITFLAGS)); static assert(typeid(WS_VISIBLE | WS_CHILD) == typeid(WINSTYLEBITFLAGS)); How do you consider about this?
Feb 09 2014
Katayama Hirofumi MZ:How do you consider about this?I think the D language is probably able to implement something like that in Phobos code, like the bitfields. Bye, bearophile
Feb 09 2014
There is no bitfield support in dlang. Could you show any example?
Feb 09 2014
On Sunday, 9 February 2014 at 13:48:08 UTC, Katayama Hirofumi MZ wrote:There is no bitfield support in dlang. Could you show any example?std.bitmanip.bitfields should be able to do it.
Feb 09 2014