|
Boost : |
Subject: Re: [boost] [range] Extended... maybe?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-04-19 06:26:38
Mathias Gaunard skrev:
> Thorsten Ottosen wrote:
>> Mathias Gaunard skrev:
>>> Thorsten Ottosen wrote:
>>>
>>>> I think single_element_range(x) has been proposed
>>>> several times. Maybe Neil could include it in range_ex?
>>>
>>> Why not simply use boost::list_of(x)?
>>
>> not very efficient.
>
> I don't see any reason why it couldn't be as efficient as
> single_element_range(x).
Then look at its implementation.
boost::assign::ref_list_of<1>(x);
is efficient.
> Also, list_of can also be used for to make a range out of n elements.
yup.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk