Move Semantics for POD-ish types

前端 未结 3 1293
隐瞒了意图╮
隐瞒了意图╮ 2021-02-20 04:31

Is there any point implementing a move constructor and move assignment operator for a struct or class that contains only primitive types? For instance,

struct Fo         


        
3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-20 05:20

    No need for that. If there are only primitive types in a class/struct, then default constructor/assignment operator will actually do that.

提交回复
热议问题