Boost logo

Boost :

From: Michael Walter (michael.walter_at_[hidden])
Date: 2006-09-23 13:09:35


On 9/23/06, Oleg Abrosimov <beholder_at_[hidden]> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk