rule of five c++ code example
Example: default rule of five c++
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;
};