I need to implement a lot of derived classes with different const member data. The data processing should be handled in the base class, but I can't find an elegant way to access the derived data. The code below is working, but I really don't like it.
The code needs to run in a small embedded environment so extensive usage of the heap or fancy libraries like Boost is no option.
class Base
{
public:
struct SomeInfo
{
const char …Run Code Online (Sandbox Code Playgroud)