|
Boost : |
From: Edward Diener (eddielee_at_[hidden])
Date: 2003-01-18 06:36:06
"David B. Held" <dheld_at_[hidden]> wrote in message
news:b0bcbp$bd9$1_at_main.gmane.org...
> "Edward Diener" <eddielee_at_[hidden]> wrote in message
> news:b0aro4$5gq$1_at_main.gmane.org...
> > [...]
> > I wonder if there have been any murmurs in the C++ standard
> > committee about the system for setting default parameters somehow
> > being changed to solve this problem, so that a user can override a
> > default without having to override all preceding ones. I know I have
> > heard suggestions about named default parameters but that doesn't
> > seem to solve the problem in my mind. Something clearer and cleaner
> > is needed but I don't know what it is.
>
> As far as policy specification goes, perhaps a new idiom of building
> policies into a unit, and passing them as one parameter might address
> both the interface complexity issue and the default policy issue. I think
> it needs to be considered further.
Given the weakness in C++ handling of default parameters, passing policies
as a single parameter where the user only need to specify the variation from
the default that he wants would be the best practical solution. The main
issue, of all policy-based template classes IMHO, is to make it as easy and
transparent to use without the user having to know, or care, about policy
variations which he may never want to change.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk