|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-10-10 08:51:19
"Peter Dimov" <pdimov_at_[hidden]> writes:
> David Abrahams wrote:
>> Terje Slettebø <tslettebo_at_[hidden]> writes:
>>
>>> // int_vector r_list = to_runtime<c_list>();
>>>
>>> int_vector r_list;
>>>
>>> boost::mpl::for_each<c_list>(to_sequence<int_vector>(r_list));
>>
>> Better yet:
>>
>> int_vector r_list;
>> boost::mpl::for_each<c_list>(std::back_inserter(r_list));
>>
>> Enjoy ;-)
>
> Um, how does this work? back_inserter returns an iterator, not a
> function object; is there some magic in mpl::for_each that I can't
> see? Maybe I'm looking at the wrong version?
No, I'm just an idiot :(.
Please ignore my post.
-- Dave Abrahams Boost Consulting http://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