From e0de4df83b19ccac128ebf7e74edce3997ecf13f Mon Sep 17 00:00:00 2001 From: Bjarne Stroustrup Date: Sun, 30 Apr 2017 13:33:35 -0400 Subject: [PATCH] added clarifying note for C.139 --- CppCoreGuidelines.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index c82c618..e0fdf3d 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -7091,6 +7091,12 @@ Consistent use of `override` would catch this. ##### Note +Note every class is meant to be a base class. +Most standard-library classes are examples of that (e.g., `std::vector` and `std::string` are not designed to be derived from). +This rule are about using `final` on classes with virtual functions meant to be interfaces for a class hierarchy. + +##### Note + Claims of performance improvements from `final` should be substantiated. Too often, such claims are based on conjecture or experience with other languages.