Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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;
};
Source by www.fluentcpp.com #
 
PREVIOUS NEXT
Tagged: #default #rule
ADD COMMENT
Topic
Name
7+7 =