Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,577 of 33,346    |
|    Seungbeom Kim to jhartzell42@googlemail.com    |
|    Re: move_back() function    |
|    05 Oct 12 23:34:25    |
      From: musiphil@bawi.org              On 2012-10-04 22:23, jhartzell42@googlemail.com wrote:       >       > I find myself, when using a vector or a deque, using this combination:       >       > do_something(std::move(deq.back());       > deq.pop_back();       >       > I wonder if there's any way to combine this concept into a move_back()       > function, but I can't think how it would work.              The answer depends on your desired usage pattern, but       maybe something like this?              template |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca