S
stephen b
There isn't any, of course but there is one for string, and it doesn't
take too much imagination to extend it to vector.
OK
v = vector<float>;
v += 0.1, 0.9, 2.3;
adds 3 elements to an emtpy vector.
v += 3.2, 4.2, 5.6;
adds 3 more elements.. same as String.
There is a well defined meaning for the comma operator,
however. And the above breaks it. It also breaks the rule that
x += y should have the same behavior as x = x + y, modulo the
fact that in one, x is evaluated twice, and in the other only
once. The fact that:
v += 1,2,3,4,5,6,7,8,9;
and
v = 1,2,3,4,5,6,7,8,9;
mean completely different things is pure obfuscation, and won't
be allowed by any reasonable coding guideline.
You've lost me. What does v = 1,2,3,4,5,6,7,8,9; do?
Stephen.