
On 9/23/06, Oleg Abrosimov <beholder@gorodok.net> wrote:
The solution with auxiliary structure for parameter bundling is just slightly more verbose, but 1) it is exact (it is hard to interpret in a wrong way) 2) it doesn't pollute namespace with parameter names 3) instance of params structure can be reused many times reducing code duplication/bloating.
Sorry for so long opus, but I really wonder why David Abrahams and Daniel Wallin put so great effort in the parameter lib. I can not see it's advantages.
Problems with your approach include: a) parameter values are copied b) parameter values need to be default-constructable (into a valid state) c) you cannot check whether mandatory parameters are supplied at compile-time (I believe) Regards, Michael