Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-08-28 17:27:12


----- Original Message -----
From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>

> if you have a completely compile time "set" with a universe of at most 256
> elements, by all means provide it here... I'm sure we could figure out some
> nifty things to do with it.

Sure. I posted it here last year but it went unnoticed. Now, the latest
version has no 256 limit and will work with an unbounded no. of elements
as long as your compiler can handle it (duh!). The absolute limit is now
#definable.

Ok, watch this space. I will re-introduce it again sometime. Compile time
bitsets, anyone?

Now, I do not wish to preempt the original poster. I think his strategy with
enums is nice.

--Joel

> At Tuesday 2002/08/27 16:11, you wrote:
> >----- Original Message -----
> >From: "spamjunk" <spamjunk_at_[hidden]>
> >
> >
> > > They aren't always known at compile-time. You can create sets dynamically
> > > at run-time, using the constructor. What SetOf allows you to do is, if all
> > > the elements are compile-time constants, create the entire set as a
> > > compile-time constant. You could use the same argument for SetOf, but it
> > > would still have to be "converted" to an actual set of bits before
> > > interacting with other sets, so you wouldn't actually be saving anything.
> >
> >No, on the contrary, you can use expression templates to make static
> >sets interact with each other. I have an implementation that can
> >conceptually hold 256 elements, can do all the set operations (i.e
> >negation, union, intersection, difference and xor). I was hoping your
> >set would be like this.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk