
22 May
2008
22 May
'08
10:13 p.m.
Olaf Peter wrote:
why not simple derive:
struct Test : boost::tuple
{ enum Members { NAME, VALUE }; }; Than you have the tuple calling syntax:
getTest::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.