Declare class member to have internal linkage
<p>Basically I have code which looks like this inside a header file:</p>

<pre><code>class Bar;
class Foo
{
public:
   Bar GetBar();
};

class Bar
{
    Foo CreateFoo() {}
};

Bar Foo::GetBar()
{...}
</code></pre>

<p>The problem with this code is that as soon as the header is included in more then one file the linker will complain that there are multiple definitions of <code>Foo::GetBar</code>. However I can't put it inside the class definition where that would work, because Bar isn't defined at that point. I don't want to put it inside a seperate .cpp file, because the rest of the library I'm writing (which isn't that heavy weight anyway) is mostly templates I would have to place in a header anyway and it seems a bit anoying to require linking something else in only because I had to put one function outside the header.</p>

<p>So is there anyway to solve this problem without creating another .cpp file?</p>
