A C++17 implementation of an active class: an active class generates a thread and controls it using functional objects passed by the client application