Non-virtual interface pattern: Difference between revisions

Content deleted Content added
m Fixing citation authorlink parameter error using AutoEd
"Virtual functions should be private". According to external link and Herb Sutter book (More Exceptional C++, problem 18).
Line 17:
A design that adheres to this pattern results in a separation of a class interface into two distinct interfaces:
# Client interface: This is the public non-virtual interface
# Subclass interface: This is the protectedprivate (non-)virtual interface.
 
With such a structure, the [[fragile base class]] interface problem is mitigated. The only detriment is that the code is enlarged a little.<ref>{{cite web