4
466
Hi all,
I have this member in a template class:
bool opsInsert(int nId, T pObj){
pairRet = insert(typename std::map<int,T>::value_type(nId, pObj)); }
which does compile with gcc but not with cl.exe (Windows).
If I remove the typename keyword, the code does not compile with gcc,
but compiles witc cl.exe....
The question: which is the standard way to call this function? Is there
any workaround to make compile with both compilers?
I know this is a compiler issue, but I hope you will help me ...
thanx,
stefan
I have this member in a template class:
bool opsInsert(int nId, T pObj){
pairRet = insert(typename std::map<int,T>::value_type(nId, pObj)); }
which does compile with gcc but not with cl.exe (Windows).
If I remove the typename keyword, the code does not compile with gcc,
but compiles witc cl.exe....
The question: which is the standard way to call this function? Is there
any workaround to make compile with both compilers?
I know this is a compiler issue, but I hope you will help me ...
thanx,
stefan