
5 Apr
2004
5 Apr
'04
6:04 p.m.
Bruno MartÃnez Aguerre wrote:
What do you think of:
vector<int> v; repeat(bind(vector<int>::push_back, &v, _1)) , 3, 4, 5;
I like it, being explicit and more general. Is something like this already in boost?
Bruno MartÃnez
I'd prefer to have on-fly container. Something like this: std::copy( on_fly % 1 % 2 % 3, on_fly_end<int>(), back_inserter<int>(v)); Not as cool as v += 1, 2, 3; but might have some advantages. -- Alexander Nasonov Independent Developer and Consultant