This stems from the dark ages when Literal was an unmovable proto. Swap was supposed to be fast (it moves) but in the conversion to a standalone class Swap wasn't implemented properly and became a 3-way copy instead of a 3-way move. All of the users want move anyways, so just remove Swap and use moves on all call sites. If actual swapping is needed, std::swap will work just fine for Literal, and the default implementation is as fast as 3 moves. PiperOrigin-RevId: 168689138 |
||
---|---|---|
.. | ||
executor | ||
BUILD |