
8 Nov
2010
8 Nov
'10
6:45 p.m.
On 11/08/10 08:25, Larry Evans wrote: [snip]
Problem solved By adding a templated member function, put, to pairs_named template.
Also, renamed overloaded arg function to at_key, since that's more descriptive.
The attached is a further simplification. Instead of 2 folds, only 1 is used and the resulting structure is really a map, map_default<P1,P2,...,Pn>, which allows the user to select which args to specify in the CTOR. One disadvantage is such a CTOR causes a default initialization of some values which are immediately overwritten by the call to put(value_pairs...) in the CTOR. Maybe another disadvantage is inheriting the values(instead of using fusion::vector) consumes more space. Haven't tested. -Larry