I do have a bitses matrix class defined as follows:
template <class INT_TYPE,class CONTAINER_INT=uINT,
INT_TYPE ContainerSize=sizeof(CONTAINER_INT)*8,
class DATA_CONTAINER=BitsetDataContainer<INT_TYPE,CONTAINER_INT,ContainerSize> >
class BitsetMatrix
{
///code
};
And I have a function:
template <class INT_TYPE>
INT_TYPE Sum(const BitsetMatrix<INT_TYPE> &M)
{
INT_TYPE Rt;
if (!M.IsEmpty())
{
//count sum using another function
}
return Rt;
}
How to define this function that it deduces INT_TYPE argument automatically? In VC++ it works fine, in GCC I need to write:
BitsetMatrix<int> BM; Sum<int>(BM);
How to define function Sum to avoid <int> in its call.
Regards






