class template, with template function, specialization
<p>I'm trying to write a template class which aids the programmer in writing correct code. It will calculate  the route from San Francisco to New York via Washington, given the route from San Francisco to Washington and the route from Washington to New York. When given the route from San Francisco to Los Angeles and Washington to New York, the compiler will report an error.</p>

<p>Here is the class (without the normal workhorse function):</p>

<pre><code>extern const char miami[] = "Miami";

template&lt; const char* FINISH, const char* START&gt;
class Route {
public:
    Route();
    ~Route() {};

    template&lt;const char* OTHERPLACE&gt;
    Route&lt;START, OTHERPLACE&gt; alterFinish() const;
};

template&lt;const char* START&gt; // specialisation
template&lt;const char* OTHERPLACE&gt;
// Allow only miami as FINISH to be changed to something else.
Route&lt;START, OTHERPLACE&gt; Route&lt;START, miami&gt;::alterFinish() const{
    return Route&lt;START, OTHERPLACE&gt;();
}
</code></pre>

<p>Unfortunately this does not work. I get an 'invalid use of incomplete type' error. The same sort of function without the specialisation does compile. What am I doing wrong?</p>
