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 {
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