Boost logo

Boost :

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

On 04/27/2005 01:06 PM, Larry Evans wrote:
> Anyway, I should say, w.r.t. redundancy, that the following code:
However, with respect to your desire for using a template member

    template<class FieldType>

to get some field in the tuple of type, FieldType, this can easily be
done with a slight modification of the code for tuple_indexed
in the vault:

    template<class FieldType>
       typedef find<Values,FieldType>::type pos;
       typedef distance<pos,front<Values> >::type offset;
       Indices const index=Indices(offset::value);
       return get<index>();

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