improve code example, use() function makes little sense with void results of f() and g()

This commit is contained in:
Thibault Kruse 2016-08-24 14:13:42 +02:00
parent 7c991f0e7e
commit 25e3ec4652

View File

@ -15785,18 +15785,18 @@ Use the least-derived class that has the functionality you need.
class Base { class Base {
public: public:
void f(); Bar f();
void g(); Bar g();
}; };
class Derived1 : public Base { class Derived1 : public Base {
public: public:
void h(); Bar h();
}; };
class Derived2 : public Base { class Derived2 : public Base {
public: public:
void j(); Bar j();
}; };
// bad, unless there is a specific reason for limiting to Derived1 objects only // bad, unless there is a specific reason for limiting to Derived1 objects only