Hello,
I have an error at compile time for a template.
Here the declaration :
template <USHORT16 maxSize,typename Element> class ArrayDataType .....
template<USHORT16 maxSize> class OctetStringDataType: public ArrayDataType<
maxSize, UCHAR8> .....
Now i have a code generator that give me the C++ definition based on data store in a DB.
For each template class every thing is coded into the h files
What i expect is an array of OctetString.
This can be sum up by the typedef below:
typedef ArrayDataType<ATYPE_VALUE2_SIZE,OctetStringDataType<100>> ATYPE_VALUE2;
Unfortunetely i have few errors :
Error: #20: identifier "ATYPE_VALUE2" is undefined
Error: #439: expected a ">"
Warning: #375-D: declaration requires a typedef name
I found that the following code below compiles but does not match my needs ( not complient with what is store into the DB.)
typedef struct TEMP_DATA
{
OctetStringDataType<100> value;
}TEMP_DATA;
typedef ArrayDataType<ATYPE_VALUE2_SIZE,TEMP_DATA> ATYPE_VALUE2;
Any one got an answer ?
Thanks
Last edited on
Problem solve ...
Just need an extra space to avoid mismatch with >> operator !!!
Thanks
I think this is something that was improved in C++11. When that gets, common you won't have this issue!