📜  五个c++代码示例的默认规则

📅  最后修改于: 2022-03-11 14:44:53.368000             🧑  作者: Mango

代码示例1
class X
{
public:
   X() = default;
   
   X(X const& other) = default;
   X& operator=(X const& other) = default;
   
   X(X&& other) = default;
   X& operator=(X&& other) = default;
   
   ~X() = default;
};