Boost logo

Boost :

From: Emily Winch (emily_at_[hidden])
Date: 2002-04-09 13:20:06


Jan Langer wrote:
>On Tue, 9 Apr 2002, Stewart, Robert wrote:
>>hardly think about it (other than to wish for a standardized, template
>>version so you can quit rewriting it!).
>
>enum color { brown, blue, green, black };
>enum sex { male, female };
>
>template <sex Sex, color EyeColor, color HairColor>
>class child
>{
> public:
> child (SIUnits::length const &s = 190,
> SIUnits::weigth const &w = 80);
> private:
> SIUnits::length size_;
> SIUnits::weigth weigth_;
>};

But... but my hair colour varies at runtime!

Some people's gender does that too.
Perhaps a generator that we can feed with two compile-time lists of genes?
Some kind of protection against unintended instantiation would be useful
too.

Emily


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