|
Boost : |
Subject: Re: [boost] [Boost-users] Formal Review: Boost.RangeEx
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-02-23 04:54:10
Mathias Gaunard skrev:
> Thorsten Ottosen wrote:
>> Mathias Gaunard skrev:
>
>>> make_range(0, 1, 2, 3) could be a range of 4 elements, being 0, 1, 2
>>> and 3.
>>
>> You mean like
>>
>> boost::assign::list_of(0)(1)(2)(3)
>>
>> ?
>
> I naively thought that was equivalent to
>
> std::list<int> l;
> l.push_back(0);
> l.push_back(1);
> l.push_back(2);
> l.push_back(3);
>
> but actually, this is exactly what is needed.
It is, but the constructed object is also a Range.
It you want an efficient version, use cref_list_of<N>().
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk