From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-11-21 21:53:32
Joel de Guzman wrote:
> Well, it's just for that specific case. Did you intend the
> transform to be generic? I didn't think so when you had
> it hard coded to int. I guess, it really depends on what
> your intent is. A transform cannot, in general, return a
> reference. What if the input is computed on the fly,
> like, say:
> mpl::vector_c<int, 1, 2, 3>
Yes, a FunctionObject return type is often orthogonal to deref type of sequence.
In such case, a higher-order function is needed to avoid dangling:
Well, my question is more primitive:
What is "value_at"?
The current implementation is:
value_at of transform_view returns boost::result_of<F(value_at of its underlying sequence)>::type
I couldn't understand what this implementation wants to do.
I tend to think `value_at` of transform_view should be the same as
`result_of::deref` of transform_view.
I'm not sure, though.
-- Shunsuke Sogame
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk