Using "namespace foo {" instead of explicitly qualifying outside of header files
<p>If a function is declared as such:</p>

<pre><code>namespace foo {
    void bar();
}
</code></pre>

<p>Most people define the function like this:</p>

<pre><code>void foo::bar() {
    ...
}
</code></pre>

<p>However I like to do it this way:</p>

<pre><code>namespace foo {
    void bar() {
        ...
    }
}
</code></pre>

<p>I prefer this style because its saves me from always retyping foo::, which is often tedious in function parameters that accept types declared in that same namespace. Plus its easier to rename the whole namespace.</p>

<p>I'm wondering why I almost never see my style in other peoples code, are there any disadvantages too it, besides the additional indentation level (and you don't even have to indent namespaces)?</p>
