Protected template member functions in a template class
<p>Suppose we have</p>

<pre><code>template&lt;typename T&gt;
class Base
{
    ...

    protected:

        template&lt;typename U&gt;
        void compute(U x);

    ...
};
</code></pre>

<p>Now I want to call this method from a derived class. With non-template member functions I would normally use <code>using ...</code> declaration or access members with <code>this-&gt;...</code>. However, it's not clear how to access template members:</p>

<pre><code>template&lt;typename T&gt;
class Derived : public Base&lt;T&gt;
{
    // what's the correct syntax for
    // using ... template ... Base&lt;T&gt;::compute&lt;U&gt; ... ?

    ...

    void computeFloat()
    {
        float x = ...;
        compute&lt;float&gt;(x);
    }

    void computeDouble()
    {
        double x = ...;
        compute&lt;double&gt;(x);
    }

    ...
};
</code></pre>