[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Is it unhelpful to move containers explicitly?
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Is it unhelpful to move containers explicitly? |
Date: |
Thu, 11 Oct 2018 14:30:50 +0200 |
On Thu, 11 Oct 2018 00:26:39 +0000 Greg Chicares <address@hidden> wrote:
GC> Everyone agrees that 'std::move()' is a misleading name. In one online
GC> discussion that I came across, someone suggested that 'std::plunder()'
GC> would be better; it makes sense if you've watched enough pirate movies.
FWIW I'd call it std::disown() or maybe std::renounce() because the
important thing is that you promise the compiler to not use[*] the value
any more, meaning that it is free to do whatever it needs with it. I think
it might be more helpful to think about it from this point of view, but
maybe it's just me.
Regards,
VZ
[*] Where some references to the object, notably assigning a new value to
it, don't count as "use".