Undefined symbol using template
<p>I am getting a linker error building this code:</p>

<p>Exclude.h file</p>

<pre><code>class IsExclude
{
    public:
        template&lt;typename T&gt;
        bool operator()(const T* par);
        virtual ~IsExclude() = 0;
};

IsExclude::~IsExclude() {}

class IsExcludeA : public IsExclude
{
    public:
        IsExcludeA(std::string toCompare) : toCompare_(toCompare)  {}
        template&lt;typename T&gt;
        bool operator()(const T* par)
        {
            return strcmp(par-&gt;Something, toCompare_.c_str() ) ? false : true ; 
        }
        ~IsExcludeA() {}
    private:
        std::string toCompare_;
};
</code></pre>

<p>In the same file:</p>

<pre><code>/*
 * loop over a container of function objects
 * if at least one of them return true the function
 * return true, otherwise false
 * The fuction was designed to evaluate a set of
 * exclusion rule put in "and" condition.
 */
template&lt;typename T,typename P&gt;
bool isExclude( const T&amp; cont, const P* toCheck )
{
    typename T::const_iterator pos;
    typename T::const_iterator end(cont.end());
    bool ret(false);
    for (pos = cont.begin(); pos != end; ++pos)
    {
        if ( (*pos)-&gt;operator()(toCheck) == true )
        {
            ret = true;
            pos = end;
        }
    }    
    return ret;
}
</code></pre>

<p>The cpp file where I use the previous call looks like this:</p>

<pre><code>std::vector&lt;IsExclude* &gt; exVector;

exVector.push_back( new IsExcludeA(std::string("A")) );
exVector.push_back( new IsExcludeA(std::string("B")) );

if (isExclude(exVector,asset) == false)
{
     // Blah
}
</code></pre>

<p>The code compile fine but I got an error from the linker:
Undefined                       first referenced
 symbol                             in file
bool IsExclude::operator()(const __type_0*) MyFile.o</p>

<p>Do you have any hint or suggestions?</p>

<p>Thanks</p>

<p>P.S. I am aware I need to clean up the vector in order to avoid memory leak. I can't use boost::shared_ptr with my compiler. Sigh!</p>
