Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-04-27 16:02:41

Replying to self:

On 04/27/2005 11:54 AM, Larry Evans wrote:
>>> with enum is clumsy and not type safe. I.e. a tuple might not map
>>> the whole enum set enum {a, b, c}, but get<a>(tuple_foo) would still
>>> compile even if 'a' is not logically part of tuple_foo. Also you are
> If you've defined the enum and map together, e.g. in the enum_map<i>
> structure, and used them together in enum_mapped, as shown here:

OOPS. Maybe you meant that although there were, e.g. 3 enumerators in
the enumeration, the map was only defined for 2 or 1 or none. To be
concrete, an example would be where enum_map<0> in the above vault code

   < 0
     { f_0
     , f_1
     , f_2

       template<field_names FieldName>

       < mpl::pair<field_name<f_0>, type_i<0> >

then I can see your point about "tuple might not map
the whole enum set".

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