23 Jun
2017
23 Jun
'17
9:55 a.m.
degski wrote:
On 23 June 2017 at 03:25, Peter Dimov via Boost
wrote: For one, vector functions that grow the size typically return void. So you could just turn that into bool or an enum and you'd be done.
Maybe pop_back() could be made to return the popped element instead of void.
pop_back doesn't grow the size. It never needs to reallocate. As for why it doesn't return the element, because copying it may throw.