Код: Выделить всё
typedef struct _RAW_DATA{
int a;
int b;
}RAW_DATA;
Код: Выделить всё
template
struct ProcessedData{
typedef RAW_DATA INPUT_TYPE[TDim][TDim];
};
Код: Выделить всё
template
struct ProcessedData{
...
struct ProcessedElem{
const int a1;
const int a2;
const int b1;
const int b2;
int otherValue1;
int otherValue2;
ProcessedElem(const RAW_DATA &RawData) : ... /*do member initialization*/ {}
};
ProcessedElem prcessedData[TDim][TDim]
};
Код: Выделить всё
template
struct ProcessedData{
...
ProcessedData(const INPUT_TYPE &Input)
: prcessedData{/*somehow forward each element of Input to the corresponding element*/}
{}
};
Подробнее здесь: https://stackoverflow.com/questions/798 ... of-objects
Мобильная версия