I would like some guidance on how to use operator[] with sequences...
From the various documentation it seems that the intent is for this operator to be used to both access and manipulate elements in a sequence. I have been unable to figure out what type this operator is expecting or how to declare an object of that type.
sequence.h declares the following:
template<class T, int TID>
inline T &
SequenceTmpl<T,TID> :: operator[] (MICO_ULong idx)
{
return vec[idx];
}
mico generates the following idl from currency.idl:
typedef SequenceTmpl< Country,MICO_TID_DEF> Countries;
so why does the following not compile?
Country yada;
Countries countries();
countries.length(1);
countries[0] = yada; // fails
operator[] seems to both return and accept SequenceTmpl<Currency :: Country, 0> rather than T, which is what the header seems to be saying.
please help.