Hi All,
I have a template class that is:
template <class identifier,class registeredObject>
class FxPairRegistry : public FxRegistry<pair<identifier,registeredObject> >
{
public:
registeredObject GetEntry(identifier, FxBool assertValue = true);
void RegisterInOrder(const pair<identifier,registeredObject> &ob);
typedef typename std::vector<pair<identifier,registeredObject> >::iterator iter;
};
I then have:
template <class identifier,class registeredObject>
registeredObject FxPairRegistry<identifier,registeredObject>::GetEntry(identifier id, FxBool
assertValue)
{
for (iterator iter = mRegistryList.begin(); iter != mRegistryList.end(); iter++)
{
if ((*iter).first == id)
{
return (*iter).second;
}
}
}
But I get errors like:
error: missing template arguments before 'iter'
error: expected `;' before 'iter'
error: expected primary-expression before '!=' token
error: 'mRegistryList' was not declared in this scope
error: expected primary-expression before '++' token
error: expected primary-expression before ')' token
error: expected primary-expression before ')' token
error: missing template arguments before 'iter'
error: expected `;' before 'iter'
error: expected primary-expression before '!=' token
error: 'mRegistryList' was not declared in this scope
error: expected primary-expression before '++' token
I dont quite get what I am doing wrong, but I am rusty a bit for sure....