This rule is also called data hiding and is one of the corner stones of object oriented class design. It means that you should think about two interfaces to your class. A public interface for the general use case and a protected interface for derived classes. The remaining members should be private.

Concrete types

A concrete type is "the simplest kind of a class". It is often called a value type and is not part of a type hierarchy. Of course, an abstract type can not be concrete.

A regular type is a type that "behaves like an int" and has, therefore, to support copy and assignment, equality, and ordering. To be more formal. A regular type Regular supports the following operations.

Copy and assignment

Regular a;
Regular a = b;
~Regular(a);
a = b;

Equality

a == b;a != b;

Ordering

a < b;

The built-in types are regular such as the container of the standard template library.

If you have no use-case for a class hierarchy, use a concrete type. A concrete type is way easier to implement, smaller and faster. You have not to think about inheritance, virtuality, references or pointers including memory allocation and deallocation. There will be no virtual dispatch and, therefore, no runtime overhead.

What's next

Get your e-book at leanpub:

The C++ Standard Library

Concurrency With Modern C++

Get Both as one Bundle

With C++11 and C++14 we got a lot of new C++ libraries. In addition, the existing ones are greatly improved. The key idea of my book is to give you the necessary information to the current C++ libraries in about 200 pages.

C++11 is the first C++ standard that deals with concurrency. The story goes on with C++17 and will continue with C++20.

I'll give you a detailed insight in the current and the upcoming concurrency in C++. This insight includes the theory and a lot of practice with more the 100 source files.

Get my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle.

In sum, you get more than 500 pages full of modern C++ and more than 100 source files presenting concurrency in practice.