Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-04-27 13:06:06


On 04/27/2005 12:40 PM, Giovanni P. Deretta wrote:
Giovanni, I guess this was an "OOPS" since there was nothing added.
Anyway, I should say, w.r.t. redundancy, that the following code:

         enum_map<0>::field_names const index=enum_map<0>::f_0;

from the vault file mentioned here:
> Larry Evans wrote:
[snip]
>>
>>http://boost-sandbox.sourceforge.net/vault/index.php?&direction=0&order=&directory=cppljevans

>>

does contain some redundancy since the field_name, f_0, has to be
qualified with the struct, enum_map<0>, where it's defined.
Also, in enum_map, there's redundancy in that the enumeration has to be
defined first before it's used in the mpl::map. This is in contrast
to the corresponding struct:

   struct enum_map_0
   {
     type_i<0> f_0;
     type_i<1> f_1;
     type_i<2> f_2;
   };

where the field names only occur once.


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