Is flags enum needed in Phobos?

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Sep 26 11:46:21 PDT 2012


On 26-Sep-12 22:17, Denis Shelomovskij wrote:
>
> Please give me usage examples (unittests), and I will implement the
> functionality. Now I don't understand what are n-state flags and what is
> the difference with std.bitmanip.bitfields.
>

Well thinking more of it, bitfields indeed will do for a fixed bunch of 
flags (if it supports enums).

What's missing is an analog of BitArray but for arbitrary integer enum 
type to pack them efficiently (depending on number of possible values). 
Though I guess the usage is somewhat niche.


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list