
20 Jul
2012
20 Jul
'12
1:55 p.m.
On 19-07-2012 18:00, Jochen Wilhelmy wrote:
Hi!
is it possible to make += also work for containers on right side?
Many things are possible in C++.
Am 20.07.2012 15:19, schrieb Thorsten Ottosen: then why not do it ? ;-)
i.e. int a; std::vector<int> b; std::list<int> c; std::vector<int> d; d += a,b,c,d;
this would be similar to strings where += at least works with one string on the right side.
You could maybe do
push_back( d ).range( a ).range( b ).range( c ).range( d );
i'm after having to write only += of course i can write insead of d += 1,2,3,4; d.push_back(1);d.push_back(2);d.push_back(3);d.push_back(4); -Jochen