P
Pallav singh
Hi All,
i am getting error during explicit function Instantiation for a class
Template
if i do explicit Instantiation of class it work and all function
symbol i get in object file
But if i try to expose only one function of my class its failing
#include <iostream>
template<typename T>
class A
{
const T max(const T a,const T b)
{ return ((a<b)?b:a); }
const T min(const T a,const T b)
{ return ((a<b)?a:b); }
};
// used for Explicit Instantiation of class
//template class A<int>;
// used for Explicit Instantiation of different function of class
template int A<int>::max(int,int);
template int A<int>::min(int,int);
Thanks
Pallav Singh
i am getting error during explicit function Instantiation for a class
Template
if i do explicit Instantiation of class it work and all function
symbol i get in object file
But if i try to expose only one function of my class its failing
#include <iostream>
template<typename T>
class A
{
const T max(const T a,const T b)
{ return ((a<b)?b:a); }
const T min(const T a,const T b)
{ return ((a<b)?a:b); }
};
// used for Explicit Instantiation of class
//template class A<int>;
// used for Explicit Instantiation of different function of class
template int A<int>::max(int,int);
template int A<int>::min(int,int);
Thanks
Pallav Singh