From 62ac49b37abaad70d40a366e59361c28de9e5fc4 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 22 Sep 2015 01:40:05 -0700 Subject: [PATCH] T.80: Fixed minor typos and a missing template argument in an example. --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e5b15cb..d0c0b45 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -9762,7 +9762,7 @@ The two language mechanisms can be use effectively in combination, but a few des }; template - class Vector : public Container { + class Vector : public Container { public: // ... }; @@ -9773,12 +9773,12 @@ The two language mechanisms can be use effectively in combination, but a few des It is probably a dumb idea to define a `sort` as a member function of a container, but it is not unheard of and it makes a good example of what not to do. -Given this, the compiler cannot know if `vector::sort()` is called, so it must generate code for it. -Similar for `vector::sort()`. +Given this, the compiler cannot know if `Vector::sort()` is called, so it must generate code for it. +Similar for `Vector::sort()`. Unless those two functions are called that's code bloat. Imagine what this would do to a class hierarchy with dozens of member functions and dozens of derived classes with many instantiations. -**Note**: In many cases you can provide a stable interface by not parameterize a base; see [???](#Rt-abi). +**Note**: In many cases you can provide a stable interface by not parameterizing a base; see [???](#Rt-abi). **Enforcement**: