Explicitly defaulted functions (C++11)

Note: IBM supports selected features of C++11, known as C++0x before its ratification. IBM will continue to develop and implement the features of this standard. The implementation of the language level is based on IBM's interpretation of the standard. Until IBM's implementation of all the C++11 features is complete, including the support of a new C++11 standard library, the implementation may change from release to release. IBM makes no attempt to maintain compatibility, in source, binary, or listings and other compiler interfaces, with earlier releases of IBM's implementation of the new C++11 features.

Explicitly defaulted function declaration is a new form of function declaration that is introduced into the C++11 standard. You can append the =default; specifier to the end of a function declaration to declare that function as an explicitly defaulted function. The compiler generates the default implementations for explicitly defaulted functions, which are more efficient than manually programmed function implementations. A function that is explicitly defaulted must be a special member function and has no default arguments. Explicitly defaulted functions can save your effort of defining those functions manually.

You can declare both inline and out-of-line explicitly defaulted functions. For example:
class A{
public:  
   A() = default;            // Inline explicitly defaulted constructor definition
   A(const A&);
   ~A() = default;           // Inline explicitly defaulted destructor definition
};

A::A(const A&) = default;    // Out-of-line explicitly defaulted constructor definition 
You can declare a function as an explicitly defaulted function only if the function is a special member function and has no default arguments. For example:
class B {
public:
  int func() = default;     // Error, func is not a special member function.
  B(int, int) = default;    // Error, constructor B(int, int) is not 
                            // a special member function.
  B(int=0) = default;       // Error, constructor B(int=0) has a default argument. 
};

The explicitly defaulted function declarations enable more opportunities in optimization, because the compiler might treat explicitly defaulted functions as trivial.