You cannot reopen struct / class definitions in C ++, so itβs best to create derived versions of third-party structures and add your constants as follows:
struct My_A : public A
{
static const int b = a;
};
Otherwise, you could save a map of your constants with keys based on struct typeid.
I like the idea of ββGeorg.