I've seen BitField, but this is for a slightly different purpose, namely a
replacement for C's bit fields. I don't even know why we need BitField,
because it's in the language itself, perhaps some strange compiler doesn't
handle it? EnumSet OTOH is (not surprisingly ;-) a data type for a set of
values from an enum. Of course this could be implemented via bit fields, but
this would lose typing information (like in CompilationInfo's flags) and mix
the concept with its implementation.

In any case, EnumSet is not a big deal and g++ compiles it away almost
completely, leaving only a plain integral value, which is nice.

Cheers,
    S.

On Thu, Jul 21, 2011 at 14:51, William Hesse <[email protected]> wrote:

> We had a bit_field template, though I can't remember the name, that
> declared getters and setters
> of the type bit_field<4,3>, for a bit field starting at position 4,
> and of length 3.  Has this disappeared- I can't
> find it anymore.  If now, wouldn't this be appropriate to use for this
> purpose?  The setter had a check to see that
> the value was within range.
>
> On Thu, Jul 21, 2011 at 1:51 PM,  <[email protected]> wrote:
> > lgtm
> >
> > http://codereview.chromium.org/7472029/
> >
> > --
> > v8-dev mailing list
> > [email protected]
> > http://groups.google.com/group/v8-dev
> >
>
>
>
> --
> William Hesse
> Software Engineer
> [email protected]
>
> Google Denmark ApS
> Frederiksborggade 20B, 1 sal
> 1360 København K
> Denmark
> CVR nr. 28 86 69 84
>
> If you received this communication by mistake, please don't forward it
> to anyone else (it may contain confidential or privileged
> information), please erase all copies of it, including all
> attachments, and please let the sender know it went to the wrong
> person. Thanks.
>

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to