
27 Apr
2005
27 Apr
'05
6:36 p.m.
On 04/27/2005 01:06 PM, Larry Evans wrote: [snip]
Anyway, I should say, w.r.t. redundancy, that the following code: However, with respect to your desire for using a template member function:
template<class FieldType> FieldType& get() ; 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> FieldType& get() { typedef find<Values,FieldType>::type pos; typedef distance<pos,front<Values> >::type offset; Indices const index=Indices(offset::value); return get<index>(); }