c++: class declaration and definition seperated inside header causes Duplicate Symbol
<p>I usually only have the definitions of my classes inside a header if they are template classes.- If this is the case, i still like to split declaration and definition inside the header like that:</p>

<pre><code>template&lt;class T&gt;
class Foo
{
public:

    Foo();

    void fooFunc();
};


template&lt;class T&gt;
Foo&lt;T&gt;::Foo()
{

}

template&lt;class T&gt;
void Foo&lt;T&gt;::fooFunc()
{

}
</code></pre>

<p>that code also compiles. But If I remove the template:</p>

<pre><code>class Foo
{
public:

    Foo();

    void fooFunc();
};


Foo::Foo()
{

}

void Foo::fooFunc()
{

}
</code></pre>

<p>i get a duplicate symbol error for Foos functions. I was very sure that this should work and am very suprised that it does not. Is this expected behaviour? If I add an inline before the definition it works too.</p>
