From 25e3ec4652d901b7d9039df0a698e8f7bef1525d Mon Sep 17 00:00:00 2001 From: Thibault Kruse Date: Wed, 24 Aug 2016 14:13:42 +0200 Subject: [PATCH] improve code example, use() function makes little sense with void results of f() and g() --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 4b56a65..d6fa3b4 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -15785,18 +15785,18 @@ Use the least-derived class that has the functionality you need. class Base { public: - void f(); - void g(); + Bar f(); + Bar g(); }; class Derived1 : public Base { public: - void h(); + Bar h(); }; class Derived2 : public Base { public: - void j(); + Bar j(); }; // bad, unless there is a specific reason for limiting to Derived1 objects only