Skip to content

Latest commit

 

History

History
84 lines (46 loc) · 817 Bytes

CppFinal.md

File metadata and controls

84 lines (46 loc) · 817 Bytes

 

 

 

 

 

 

final is a C++11 contextual keyword to indicate that a virtual member function cannot be overriden, or that a class cannot be used as a base class.

 

 

 

 

 

Examples

 

 

 

 

 

 

 

  • Use final only sparingly [1]

 

 

 

 

 

References

 

  1. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 20.7. Advice. page 611: '[5] Use final only sparingly'