Move constructor on derived object

前端 未结 3 999
一个人的身影
一个人的身影 2020-11-29 05:38

When you have a derived object with a move constructor, and the base object also has move semantics, what is the proper way to call the base object move constructor from the

3条回答
  •  半阙折子戏
    2020-11-29 06:09

    Named R-value references are treated as L-value.

    So we need std::move to convert it to R-Value.

提交回复
热议问题