Why does this need an explicit std::move?

后端 未结 4 830
失恋的感觉
失恋的感觉 2020-12-18 20:57

Let\'s say I got a Foo class containing an std::vector constructed from std::unique_ptr objects of another class, Bar.

4条回答
  •  清酒与你
    2020-12-18 21:18

    Confusing as it might seem, an rvalue-reference binds to an rvalue, but used as an expression is an lvalue.

提交回复
热议问题