
23 Feb
2009
23 Feb
'09
9:54 a.m.
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