Noah Roberts | 23 May 00:13

Re: tuple type question

Olaf Peter wrote:

> why not simple derive:
> 
> struct Test
>    : boost::tuple<int,char>
> {
>        enum Members { NAME, VALUE };
> };
> 
> Than you have the tuple calling syntax:
> 
> get<Test::Name>( ... )
> 
> That's what I use for reading and writing "named" tuples.

How useful have people found this technique?  I started using tuples for 
simple data structures and did such a thing.  I found that it added more 
syntatic complexity than was of benefit; that simply creating a data 
store class/POD was the easier, clearer method.

Gmane