Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2008-01-09 15:23:22


AMDG

Tobias Schwinger <tschwinger <at> isonews2.com> writes:

> > IMO, the whole thing is a minor concern. I don't expect people to use
> > general purpose function objects with switch_.
>
> And because of that, readability, clarity and soundness of the design
> become a minor concern?!

I didn't say that. I could read either one without any difficulty.
Thus, it's a minor concern because the impact on the above is small.

> When looking at three headers; one with the 'switch', another one
> defining 'F' and yet another one defining 'Default' it's completely
> unintuitive that valid result types of 'Default' are constrained by
> 'F::result_type', for instance.

OK. Now I'm convinced.

> Another example: Let's say we want to compute a variant type as brought
> up by Joel. Now we'd have to hard-wire knowledge about the cases inside
> the function object. It's pretty obvious that it doesn't belong there.

Yep.

In Christ,
Steven Watanabe


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