Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-04-26 17:34:53

On 04/26/2005 05:22 PM, Giovanni P. Deretta wrote:
>> Agreed, but the indexed get works just as well when the argument is
>> an enumerator instead of a literal unsigned, and when it's an
>> enumerator, the meaning is clearer:
>> t.get<0>();
>> t.get<1>();
>> is obviously not as clear as:
>> t.get<first_field>();
>> t.get<second_field>();
>> [snip]
> Well, i actually believe the first to be clearer. It is a matter of
> taste though.

I hope you didn't misinterpret what I was saying. I used 'first_field'
and 'second_field' to emphasize the use of names instead of numbers.
In a real application, the names would, of course, indicate the type of
relationship. E.g. in an employee record, the enumerators would be:

    { name
    , salary
    , title

which, I hope you'll agree would make the meaning of:


clearer than:


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