Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-01 08:12:35


----- Original Message -----
From: <nbecker_at_[hidden]>

> rogeeff> To Neal Backer:
> rogeeff> I do not see what do we buy making Policy methods static.
Dave could
> rogeeff> you clarify following question: since current design of
> rogeeff> iterator_adaptor allows implemnetation if adaptor policies
both as
> rogeeff> member funtion and static function (since policy could be
accessed
> rogeeff> through this or Base.policy()), is there any valid reasons to
prefere
> rogeeff> one way over another?
>
> I believe the code is more clear. Since the adaptor object is passed
> as an argument to the unary functions, I find it confusing if the
> argument is not used. In the case of binary functions, the lack of
> symmetry is also confusing. I was under the impression, perhaps
> wrongly, that the policies were really intended to be static, but were
> not made static only to satisfy some broken compiler.

I'm not religious about this. One might prefer member functions in adaptors
where the policies have state. Pick whichever formulation you're comfortable
with.

-Dave


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