Oracle® Solaris Studio 12.4: C++ User's Guide

Exit Print View

Updated: March 2015
 
 

Please tell us how to improve our documentation:


0 of 500

0 of 500



0 of 500
Thank you for your feedback! If you want to participate in content improvement and share additional information, please click Feedback button.
Rate this document:

9.4.1 Choosing to Pass Classes Directly

To maximize the chance that a class will be passed directly:

  • Use default constructors, especially the default copy constructor, where possible.

  • Use the default destructor where possible. Because the default destructor is not virtual, a class with a default destructor should generally not be a base class.

  • Avoid virtual functions and virtual bases.