Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-09-01 07:52:14

Hi Angle,

some comment to your code:

    iterator begin(){ return iterator(items.begin(),0); };
    iterator end(){ return iterator(items.end(), items.size()); };
should have const versions too

    size_type size() { return items.size(); }
    size_type max_size() { return items.max_size(); }
    bool empty() { return items.empty(); }
should all be const

"AngleWyrm" <anglewyrm_at_[hidden]> wrote in message
|A proposal for inclusion into the boost libraries:
|The hat container derives it's name from the act of pulling names from a
|hat. It is a container which provides random selection of it's contents,
|where the items can have differing probabilities, and can either be removed
|like cards from a deck, or come up again like rolling dice.

your documentation looks very good, though I would like you to consider one important issue:

It seems to me that the hat class is more a bunch of algorithms than a container; instead of requiring users
to use the hat class, maybe you could see if it is possible to come up with a set of generic algorithms that
work on any container with certain properties.



Boost list run by bdawes at, gregod at, cpdaniel at, john at