|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-04-11 21:39:57
John Torjo <john.lists_at_[hidden]> writes:
> David Abrahams wrote:
>
>>John Torjo <john.lists_at_[hidden]> writes:
>>
>>
>>
>>>>It seems to me that, since I know that binding to an rvalue is
>>>>required, we ought to have a way to say "force this to be a const
>>>>ref". I thought of something like
>>>>
>>>> std::for_each(
>>>> make_difference_iterator(p->second.begin())
>>>> , make_difference_iterator(p->second.end())
>>>> , boost::bind(&fu::writeVInt, &prox, boost::cref(_1)));
>>>>
>>>>
>>>>
>>>>
>>>How about constifying the original sequence?
>>>
>>>
>>
>>That wouldn't help.
>>
>>
>
> duh :D what was I thinking?
>
> However, I looked for difference iterator, and did not find any docs
> or anything else.
No, it's just something I cooked up here.
> So, for the above case, what's the difference_iterator's value_type
> and reference,
say they're both int.
> and what's the writeVInt's signature?
let's say it's
void fu::writeVInt(something_that_int_is_convertible_to)
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk