C++: A prvalue is not a temporary

(blog.knatten.org)

4 points | by ingve 2 days ago ago

2 comments

  • dzdt 2 days ago

    I tried to read this but am stuck on his language. He uses the phrase "move from" repeatedly without explaining it. My best guess is he is not a native English speaker and just means "move" in the sense of relocate the memory storage location of an object?

    • quuxplusone 20 hours ago

      "Move" in the sense of https://stackoverflow.com/questions/3106110/what-is-move-sem...

      Now, if you don't know what "move semantics" is, then "lvalues can't be moved from" isn't terribly helpful, and if you do then it's tautological, so I'm not saying you're wrong to criticize. :) But in a C++ context, "move" does have a single specific meaning — the one he's using properly if opaquely-to-non-C++ers.