When looking over the member functions of the STL containers, an odd thought occurred to me. Why don\'t functions like std::vector
not ha
Maybe because it was not "needed"?
erase()
and insert()
have no other way than return an iterator to allow continuing a loop it was called in.
I don't see a good reason to support the same logic with push_back()
.
But sure, it would be be wonderful to make more cryptic expressions. (I don't see an improvement in your example, it looks like a good way to slow your coworkers when reading your code...)