Remove_if predicate for list
<p>why won't this work when i use template function predicate.</p>

<pre><code>class A
{
    int x;
public:
    A(int X):x(X){}
    int getX() const {return x;}
};

template &lt;typename T&gt;
bool less_than_two(T const &amp;a)
{
    return (a.getX()&lt;2);
}

int main()
{
    list &lt;A&gt; l;

    for (int i = 0; i &lt; 5; i++)
        l.push_back(i);

    l.remove_if(less_than_two);
}
</code></pre>
