我有這樣的功能:模板函數不編譯
template<template <class _Ty, class _A = allocator<_Ty> > class Container>
static void FreeAttributesVS(const Container<int>& arra)
{
for(Container<int>::const_iterator iter = arra.begin();
iter != arra.end(); ++iter)
{
//do smthng
}
}
它編譯在VisualStudio中,但在Eclipse編譯器說"Invalid template argumetns"
,我該怎麼辦?
對於哪一行沒有說是什麼? – 0x499602D2
第一行當我將鼠標懸停在分配器<_Ty>以上時,它還會顯示「類型_Ty無法解析」 –
它是否編譯*? –